HTML Entity for Asterisk Math (*)

Beginner
6 min read
Updated: Sep 2026
1 example
Unicode U+002A

What Is the Asterisk Math Entity?

Asterisk (*) is Unicode U+002A in the Basic Latin block — the same star on your keyboard. Use it for informal multiplication, footnotes, wildcards, and labels. HTML provides the named entity *.

Remember
Character     *
Unicode       U+002A
Hex entity    *
Decimal       *
Named entity  *
CSS escape    \002A
Not the same  ∗ U+2217 (∗)

All of these produce the same glyph: *. Prefer typing * in UTF-8 for normal text; use * when a raw * is ambiguous in Markdown or templates.

Quick Reference

One table for every form you will actually use.

FormCodeWhere it goes
Direct character*HTML text (UTF-8) — preferred
Named entity*HTML markup (when * is ambiguous)
Hex entity*HTML markup
Decimal entity*HTML markup
CSS escape\002AStylesheet content

When to Use Which

SituationUse
Normal page text / code / wildcardsType *
Markdown or templates where * is special*
Mathematical asterisk operator∗ (U+2217) / ∗
Dedicated multiplication sign× (×)
Generated text via ::before / ::aftercontent: "\002A"

Live Preview

ASCII asterisk in common study contexts.

Inline math 3 * 4 = 12
Large glyph *
vs. operator ∗ * ASCII · ∗ math operator
Monospace *.js   note*
With entities Named: * | Hex: * | Decimal: *

Complete HTML Example

One page that shows * with hex, decimal, named entity, CSS escape, and a typed character. Use View Output or open the live editor.

Hex + Decimal + Named + CSS + Typed

Five ways to produce * in a single document.

html
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Asterisk (*) in HTML</title>
  <style>
    #point::after {
      content: "\002A";
    }
  </style>
</head>
<body>
  <p>Asterisk using Hex Code: &#x2A;</p>
  <p>Asterisk using HTML Code: &#42;</p>
  <p>Asterisk using Named Entity: &ast;</p>
  <p id="point">Asterisk using CSS Entity: </p>
  <p>Typed directly: *</p>
</body>
</html>
Try It Yourself

How It Works

1. Hex: U+002A → &#x2A; in HTML. The browser turns it into *.

2. Decimal: same code point as 42 → &#42;. Same result as hex.

3. Named: &ast; is the standard HTML name for U+002A — useful when raw * is awkward.

4. CSS: use \002A in content (not an HTML entity). #point::after appends that * after the paragraph text.

5. Typed *: best for normal text and code. All five lines show the same glyph.

Pitfalls & Tips

Common mistakes when working with the ASCII asterisk (*).

∗

Not &lowast;

&lowast; is ∗ (U+2217). &ast; is U+002A.

Markdown

Escape when needed

In Markdown, * starts emphasis — use &ast; or backslash-escape when you need a literal star.

Math

Prefer × when required

Style guides often prefer &times; (×) over * for multiplication in published math.

CSS vs HTML

Do not mix escapes

\002A belongs in CSS. &ast; / &#x2A; belong in HTML.

Combining

Not asterisk below

U+0359 is a combining mark under a letter — not a spacing *.

Semicolon

End references

Always finish with ; — write &ast;, not &ast.

Browser Support

ASCII asterisk (U+002A) and its entity forms (&ast;, &#x2A;, &#42;, CSS \\002A) are supported in all mainstream browsers and fonts.

✓ Universal support

Asterisk (*)

Type *, or encode with named, hex, decimal, or CSS escape — same glyph everywhere.

100% Browser coverage
Google Chrome Supported
Yes
Microsoft Edge Supported
Yes
Mozilla Firefox Supported
Yes
Apple Safari Supported
Yes
Opera Supported
Yes
Internet Explorer All versions
Yes
U+002A / entities Full support

Bottom line: Prefer a typed * for normal text. Use &ast; when escaping is clearer, and \\002A only inside CSS content.

Key Takeaways

  • Unicode: ASCII asterisk is U+002A (decimal 42).
  • HTML: type *, or use &ast; / &#x2A; / &#42;.
  • CSS: use \002A inside content for generated text.
  • Watch out: * (&ast;) ≠ ∗ (&lowast;).

One line: U+002A → type * / &ast; / &#x2A; / &#42; / CSS \002A.

Frequently Asked Questions

Type * in UTF-8, or use &#x2A; (hex), &#42; (decimal), &ast; (named), or the CSS escape \002A in the content property. All render U+002A.
U+002A (hex 2A, decimal 42). Unicode names it ASTERISK. It belongs to the Basic Latin block.
Yes. &ast; maps to U+002A. Prefer it when a raw * is ambiguous in Markdown or templates; otherwise typing * is fine.
No. &ast; is U+002A (*). &lowast; is U+2217 (∗), the mathematical asterisk operator. Different code points.
HTML entities (&#42;, &#x2A;, or &ast;) go in markup. The CSS escape \002A is used in stylesheets (usually in the content property of ::before/::after). Both render *.
Use * for keyboard stars, footnotes, wildcards, and informal multiplication. Prefer × (&times;) or ∗ (&lowast;) when a style guide asks for a dedicated math operator.

Did you know?

Asterisk is Unicode U+002A (decimal 42) in Basic Latin — the same * on your keyboard. HTML provides &ast;. Prefer a typed * in UTF-8 for normal text; use &ast; when raw * is ambiguous (Markdown, templates). Not the same as ∗ (&lowast;, U+2217).

Next: Asterism

Learn the HTML entity for the asterism (⁂) used as a section break mark.

Next tutorial →

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