HTML Entity for Macron (̄)

Beginner
⏱️ 5 min read
📚 Updated: Jun 2026
🎯 1 Code Example
Unicode U+0304

What You'll Learn

How to display the combining macron (̄) in HTML using hexadecimal, decimal, and CSS escape methods. This character is U+0304 (COMBINING MACRON) in the Combining Diacritical Marks block (U+0300–U+036F)—a non-spacing diacritic placed immediately after a base letter to indicate a long vowel, overline, or phonetic stress.

Render it with ̄, ̄, or CSS escape \0304. There is no named HTML entity for U+0304. When a precomposed letter exists (e.g. ū for ū), prefer that for simpler markup and better searchability.

⚡ Quick Reference — Macron

Unicode U+0304

Combining Diacritical Marks

Hex Code ̄

Hexadecimal reference

HTML Code ̄

Decimal reference

Named Entity

Use numeric codes only

Reference Table
Name           Value
────────────   ──────────
Unicode        U+0304
Hex code       ̄
HTML code      ̄
Named entity   (none)
CSS code       \0304
Related        U+00AF = spacing macron (¯); U+0331 = macron below (̱)
1

Complete HTML Example

This example demonstrates the combining macron (̄) using hexadecimal code, decimal HTML code, and a CSS content escape. Place the entity right after the base letter:

html
<!DOCTYPE html>
<html>
<head>
 <style>
  #point::after{
   content: "\0304";
  }
 </style>
</head>
<body>
<p>Macron using Hexadecimal: a&#x0304;</p>
<p>Macron using HTML Code: e&#772;</p>
<p>x<span id="point"></span> (CSS macron on x)</p>
</body>
</html>
Try it Yourself

🌐 Browser Support

U+0304 is supported in all modern browsers when rendered with a Unicode-capable font:

Chrome 1+
Firefox 1+
Safari 1+
Edge 12+
Opera 4+
Android 4.4+
iOS Safari 1+

👀 Live Preview

See the combining macron (̄) applied to letters in common contexts:

On vowels ā ē ī ō ū
Large glyph
Statistics = sample mean, = average
Transliteration Māori, Hāwaiʻi (long vowels)
Numeric refs &#x0304; &#772;

🧠 How It Works

1

Hexadecimal Code

&#x0304; uses the Unicode hexadecimal value 0304. Place it immediately after the base letter—e.g. a&#x0304; renders a with macron.

HTML markup
2

Decimal HTML Code

&#772; uses the decimal Unicode value 772 to display the same combining mark after a base character.

HTML markup
3

CSS Entity

\0304 is used in CSS stylesheets, particularly in the content property of pseudo-elements like ::before and ::after to append the macron to adjacent text.

CSS stylesheet
=

Same visual result

All three methods produce the combining macron on a base letter: . Unicode U+0304 sits in the Combining Diacritical Marks block (U+0300–U+036F). No named HTML entity—use numeric codes or precomposed letters when available.

Use Cases

The combining macron (̄) is commonly used in:

🔤 Linguistics

Phonetic transcription and notation for long vowels in IPA and related systems.

🌐 Transliteration

Māori, Hawaiian, Latin, and other languages that mark vowel length with a macron.

📄 Typography

Proper diacritical marks in editorial, publishing, and multilingual web content.

📚 Dictionaries

Pronunciation guides and lexical entries showing long-vowel stress.

📐 Mathematics

Overline notation such as for sample mean in statistics.

🎓 Education

Language learning sites, textbooks, and course materials for vowel length.

💡 Best Practices

Do

  • Place &#x0304; or &#772; immediately after the base letter
  • Prefer precomposed characters (e.g. &umacr; for ū) when available
  • Serve pages with UTF-8 (<meta charset="utf-8">)
  • Test macron rendering across browsers and fonts
  • Use consistent numeric style (hex or decimal) per project

Don’t

  • Confuse U+0304 (combining) with U+00AF (spacing macron ¯)
  • Insert a space between the base letter and the combining entity
  • Expect a named entity—none exists for U+0304
  • Put CSS escape \0304 in HTML text nodes
  • Use padded Unicode notation like U+00304—the correct value is U+0304

Key Takeaways

1

Two HTML numeric references render the combining macron

&#x0304; &#772;
2

For CSS stylesheets, use the escape in the content property

\0304
3

Unicode U+0304 — COMBINING MACRON (non-spacing diacritic)

4

Combining Diacritical Marks block (U+0300–U+036F)

5

Always follow the base letter—e.g. a&#x0304; not &#x0304;a

❓ Frequently Asked Questions

Use &#x0304; (hex) or &#772; (decimal) immediately after the base letter—e.g. a&#x0304;. For CSS, use \0304 in content. There is no named entity.
U+0304 (COMBINING MACRON). Combining Diacritical Marks block (U+0300–U+036F). Hex 0304, decimal 772. Attaches to the preceding character.
In linguistic notation, phonetic transcription, transliteration (Māori, Hawaiian, Latin), dictionary pronunciation guides, typography, and statistical overline notation such as for sample mean.
HTML references (&#772; or &#x0304;) go in markup after the base character. The CSS escape \0304 is used in stylesheets, typically in the content property of pseudo-elements. Same visual result, different layers of the stack.
No. U+0304 has no named HTML entity. Use &#x0304; or &#772;, or prefer precomposed letters like &umacr; (U+016B) when a single code point exists for your character.

Explore More HTML Entities!

Discover 1500+ HTML character references — diacritical marks, IPA symbols, math operators, and more.

All HTML Entities →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

8 people found this page helpful