AJ OP
AJ OP

Reputation: 445

How to put the STAR symbol into title of html page?

I saw several sites have the star (some solid black, some white star) in their title tab. Anybody know how to do this?

Upvotes: 0

Views: 24005

Answers (3)

Jukka K. Korpela
Jukka K. Korpela

Reputation: 201728

You can use various star symbols (there are many of them Unicode) either as such or as an entity reference inside a title element, e.g.

<title>☆ Hello world</title>

(if the character encoding of the document is UTF-8 and has been properly declared) or, equivalently,

<title>&#x2606; Hello world</title>

However, the title element is rendered by browsers in special ways, normally using a font that depends on the operating system or on the browser, beyond author control. This means that the character repertoire can be rather limited in practice.

Upvotes: 7

Codrin Eugeniu
Codrin Eugeniu

Reputation: 1383

You mean this element? ★

In your html: &#9733; , or in js: \u2605

More info here: http://www.fileformat.info/info/unicode/char/2605/index.htm

Upvotes: 4

ChristopheD
ChristopheD

Reputation: 116247

You do know that you could have a look at the source of the web page to see how others are doing it?

But basically you want to insert the right html entity in your title tag, e.g.

<title>&#10021; test symbol</title>

Upvotes: 0

Related Questions