how to display unicode in html without javascript? - Stack Overflow

How do you display unicode character U+1F698, in the Transport And Map Symbols Block, in an html page p

How do you display unicode character U+1F698, in the Transport And Map Symbols Block, in an html page preferably without using Javascript? I have found the following html scape secuence: 🚘 which, when included in an html page, shows the following square symbol 🚘, tested in chrome and firefox.

How do you display unicode character U+1F698, in the Transport And Map Symbols Block, in an html page preferably without using Javascript? I have found the following html scape secuence: 🚘 which, when included in an html page, shows the following square symbol 🚘, tested in chrome and firefox.

Share Improve this question asked Oct 8, 2013 at 2:33 dev4lifedev4life 11.4k6 gold badges62 silver badges79 bronze badges 1
  • 3 I can see an ONCOMING AUTOMOBILE character in the question, after the words “the following square symbol”. So the character is included correctly in the question; it just does not show when a user’s system has no font containing it. – Jukka K. Korpela Commented Oct 8, 2013 at 5:13
Add a ment  | 

2 Answers 2

Reset to default 5

The codepoints website appears to have a solution. They use the Symbola font which is added to the page using @font-face, and that renders some unicode symbols correctly, including the one specified in your question.

@font-face include (for testing, don't actually link to codepoints stylesheet when in production, instead copy it locally and link there instead):

<link rel="stylesheet" href="http://codepoints/api/font-face/Symbola.css">

Displaying the character:

<span style="font-family: Symbola, serif;">&#x1F698;</span>

You probably do not have a suitable font that can display this symbol, or the font you have set it to cannot display it.

You could check if you have a font that has that character on this page.

According to this page, the only major font that supports this character is Symbola. (LastResort is not a real font)

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744156434a4560883.html

相关推荐

  • how to display unicode in html without javascript? - Stack Overflow

    How do you display unicode character U+1F698, in the Transport And Map Symbols Block, in an html page p

    8天前
    30

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信