How to Type ō (O with macron) on HTML
The letter ō does not have its own key on an English keyboard, but HTML still makes it easy to type. Use ō, or pick one of the other methods in this guide. ō appears in Mandarin Pinyin, Māori and Hawaiian.
ō on HTML: ō
Ō on HTML: Ō
Or copy it:
Method 1: Codes for web pages
| Format | Code for ō |
|---|---|
| Decimal entity | ō |
| Hex entity | ō |
| CSS content | content: "\014D"; |
| JavaScript | "\u014D" |
| URL encoded | %C5%8D |
| UTF-8 bytes | C5 8D |
Method 2: Type it directly with UTF-8
If your page starts with <meta charset="utf-8"> and the file is saved as UTF-8, you can paste ō straight into the HTML. Entities are only needed when your editor or database cannot store the character.
Method 3: Watch for normalization
ō can also be written as o plus a combining mark. Both look the same but compare as different strings. In JavaScript, call str.normalize("NFC") before comparing or searching.
How to type the capital Ō
The uppercase form works the same way with Shift added where a letter is typed.
Codes for web pages
| Format | Code for Ō |
|---|---|
| Decimal entity | Ō |
| Hex entity | Ō |
| CSS content | content: "\014C"; |
| JavaScript | "\u014C" |
| URL encoded | %C5%8C |
| UTF-8 bytes | C5 8C |
Type it directly with UTF-8
If your page starts with <meta charset="utf-8"> and the file is saved as UTF-8, you can paste Ō straight into the HTML. Entities are only needed when your editor or database cannot store the character.
About the letter ō
ō is Unicode U+014D, named LATIN SMALL LETTER O WITH MACRON. It is used in Mandarin Pinyin, Māori and Hawaiian. A flat bar above a vowel, used for long vowels in Latvian, Lithuanian, Māori, Hawaiian and Latin textbooks, and for the first tone in Pinyin. See the ō character page for every code and shortcut.
Troubleshooting
- If you see à and other symbols, the file is UTF-8 but the browser reads it as Windows-1252. Add the meta charset tag.
- Named entities are case sensitive: É and é are different letters.
- In XML and XHTML only five named entities exist, so use numeric codes there.
Frequently asked questions
What is the shortcut for ō on HTML?
ō.
Can I just copy and paste ō?
Yes. Click the copy button above, then paste with Ctrl+V on Windows and Chromebook, Cmd+V on a Mac, or touch and hold and choose Paste on a phone.
What is the Unicode code for ō?
U+014D. In HTML it is ō.
Related guides
- How to Type ō (O with macron) on Windows
- How to Type ō (O with macron) on Mac
- How to Type ō (O with macron) on iPhone
- How to Type ō (O with macron) on Android
- How to Type ō (O with macron) on Microsoft Word
- How to Type ō (O with macron) on Google Docs
- How to Type ē (E with macron) on HTML
- How to Type ī (I with macron) on HTML
- How to Type ă (A with breve) on HTML
- How to Type ą (A with ogonek) on HTML