HTML Entity for Music Sharp Sign (♯)

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

What You'll Learn

How to display the Music Sharp Sign (♯) in HTML using named, hexadecimal, decimal, and CSS escape methods. This character is U+266F (MUSIC SHARP SIGN) in the Miscellaneous Symbols block (U+2600–U+26FF)—the standard symbol for raising a note by one semitone in Western music notation.

Render it with the named entity ♯, ♯, ♯, or CSS escape \266F. Use it in chord names (e.g. F♯), scale charts, and music theory content. Pair with Music Flat Sign (♭, ♭) and Music Natural Sign (♮, ♮) in the accidentals family.

⚡ Quick Reference — Music Sharp Sign

Unicode U+266F

Miscellaneous Symbols

Hex Code ♯

Hexadecimal reference

HTML Code ♯

Decimal reference

Named Entity ♯

Most readable in music markup

Reference Table
Name           Value
────────────   ──────────
Unicode        U+266F
Hex code       ♯
HTML code      ♯
Named entity   ♯
CSS code       \266F
Meaning        Raise note by one semitone (sharp)
Related        U+266D = flat (♭, ♭)
               U+266E = natural (♮, ♮)
1

Complete HTML Example

This example demonstrates the Music Sharp Sign (♯) using hexadecimal code, decimal HTML code, the named entity, and a CSS content escape:

html
<!DOCTYPE html>
<html>
<head>
 <style>
  #point:after{
   content: "\266F";
  }
 </style>
</head>
<body>
<p>Music Sharp Sign using Hexadecimal: &#x266F;</p>
<p>Music Sharp Sign using HTML Code: &#9839;</p>
<p>Music Sharp Sign using Named Entity: &sharp;</p>
<p id="point">Music Sharp Sign using CSS Entity: </p>
</body>
</html>
Try it Yourself

🌐 Browser Support

U+266F is widely supported wherever Unicode Miscellaneous Symbols render correctly:

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

👀 Live Preview

See the Music Sharp Sign (♯) in music notation contexts:

Chord name F♯ major
Accidentals ♭ ♮ ♯
Large glyph
vs number sign ♯ music   # hash
Entity refs &sharp; &#x266F; &#9839; \266F

🧠 How It Works

1

Named Entity

&sharp; is the HTML named entity for the Music Sharp Sign—often preferred in readable chord and scale markup.

HTML markup
2

Hexadecimal Code

&#x266F; uses the Unicode hexadecimal value 266F. The x prefix indicates hexadecimal format.

HTML markup
3

Decimal HTML Code

&#9839; uses the decimal Unicode value 9839 to display the same character.

HTML markup
4

CSS Entity

\266F is used in CSS stylesheets, particularly in the content property of pseudo-elements like ::before and ::after.

CSS stylesheet
=

Same visual result

All four methods produce: . Unicode U+266F in Miscellaneous Symbols. Related: Music Flat Sign (♭, &flat;).

Use Cases

The Music Sharp Sign (♯) is commonly used in:

🎵 Sheet music

Digital scores and web-based music viewers.

🎸 Chord charts

Chord names like F♯, C♯, and G♯ in guitar and piano charts.

🎓 Music education

Theory lessons, scale diagrams, and interval explanations.

💻 Music apps

Tuners, metronomes, and practice tools with key signatures.

📰 Lyrics & blogs

Song posts and musician blogs with proper accidentals.

🌐 Reference guides

Unicode charts and HTML entity documentation.

💡 Best Practices

Do

  • Use &sharp; for readable chord and scale markup
  • Pair with ♭ and ♮ when showing all three accidentals
  • Use serif or music fonts for clearer glyph rendering
  • Add aria-label (e.g. “F sharp”) for screen readers
  • Serve pages with UTF-8 (<meta charset="utf-8">)

Don’t

  • Substitute # (number sign) for ♯ in formal notation
  • Confuse &sharp; (♯) with hashtag or hash symbols
  • Put CSS escape \266F in HTML text nodes
  • Mix entity styles randomly in one file
  • Rely on the symbol alone without accessible description

Key Takeaways

1

Three HTML references plus CSS all render ♯

&#x266F; &#9839; &sharp;
2

For CSS stylesheets, use the escape in the content property

\266F
3

Unicode U+266F — MUSIC SHARP SIGN

4

&sharp; is the standard named entity

5

Related: Flat (♭) and Natural (♮)

❓ Frequently Asked Questions

Use &sharp; (named), &#x266F; (hex), &#9839; (decimal), or \266F in CSS content. All produce ♯.
U+266F (MUSIC SHARP SIGN). Miscellaneous Symbols block (U+2600–U+26FF). Hex 266F, decimal 9839. Named entity: &sharp;.
When marking a note raised by one semitone in chord names, scales, sheet music, and music theory content on the web.
♯ (U+266F, &sharp;) is the proper music sharp symbol. # (U+0023, number sign) is a different character used for hashtags and numbering—not for formal music notation.
HTML entities (&#9839;, &#x266F;, or &sharp;) go directly in markup. The CSS escape \266F is used in stylesheets, typically in the content property of pseudo-elements. Same visual result, different layers of the stack.

Explore More HTML Entities!

Discover 1500+ HTML character references — music 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