小码哥的IT人生

UTF-8 常用标点 详解

HTML基础 2022-06-03 23:44:46小码哥的IT人生shichen

UTF-8 常用标点

范围:十进制 8192-8303,十六进制 2000-206F

如果您希望在 HTML 中显示特殊字符,可以使用下表中的 HTML 实体。

如果字符没有 HTML 实体,则可以使用十进制(dec)或十六进制(hex)引用。

示例代码:

<p>我会显示 &permil;</p>
<p>我会显示 &#8240;</p>
<p>我会显示 &#x2030;</p>

将显示为:

我会显示 ‰
我会显示 ‰
我会显示 ‰

 

完整实例【亲自试一试】:

<!DOCTYPE html>
<html>
<body>
<p>我会显示 ‰</p>
<p>我会显示 ‰</p>
<p>我会显示 ‰</p>
</body>
</html>

可以使用本站在线JavaScript测试工具测试上述代码运行效果:http://www.phpcodeweb.com/runjs.html

较老的浏览器可能不支持下表中的所有 HTML5 实体。

Chrome 和 Opera 的支持是很好的,而 IE 11+ 和 Firefox 35+ 支持所有实体。

字符 十进制 十六进制 实体 名称
  8192 2000   EN QUAD
8193 2001   EM QUAD
8194 2002 &ensp; EN SPACE
8195 2003 &emsp; EM SPACE
8196 2004   THREE-PER-EM SPACE
8197 2005   FOUR-PER-EM SPACE
8198 2006   SIX-PER-EM SPACE
8199 2007   FIGURE SPACE
8200 2008   PUNCTUATION SPACE
8201 2009 &thinsp; THIN SPACE
8202 200A   HAIR SPACE
8203 200B   ZERO WIDTH SPACE
8204 200C &zwnj; ZERO WIDTH NON-JOINER
8205 200D &zwj; ZERO WIDTH JOINER
8206 200E &lrm; LEFT-TO-RIGHT MARK
8207 200F &rlm; RIGHT-TO-LEFT MARK
8208 2010   HYPHEN
8209 2011   NON-BREAKING HYPHEN
8210 2012   FIGURE DASH
8211 2013 &ndash; EN DASH
8212 2014 &mdash; EM DASH
8213 2015   HORIZONTAL BAR
8214 2016   DOUBLE VERTICAL LINE
8215 2017   DOUBLE LOW LINE
8216 2018 &lsquo; LEFT SINGLE QUOTATION MARK
8217 2019 &rsquo; RIGHT SINGLE QUOTATION MARK
8218 201A &sbquo; SINGLE LOW-9 QUOTATION MARK
8219 201B   SINGLE HIGH-REVERSED-9 QUOTATION MARK
8220 201C &ldquo; LEFT DOUBLE QUOTATION MARK
8221 201D &rdquo; RIGHT DOUBLE QUOTATION MARK
8222 201E &bdquo; DOUBLE LOW-9 QUOTATION MARK
8223 201F   DOUBLE HIGH-REVERSED-9 QUOTATION MARK
8224 2020 &dagger; DAGGER
8225 2021 &Dagger; DOUBLE DAGGER
8226 2022 &bull; BULLET
8227 2023   TRIANGULAR BULLET
8228 2024   ONE DOT LEADER
8229 2025   TWO DOT LEADER
8230 2026 &hellip; HORIZONTAL ELLIPSIS
8231 2027   HYPHENATION POINT
8232 2028   LINE SEPARATOR
8233 2029   PARAGRAPH SEPARATOR
8234 202A   LEFT-TO-RIGHT EMBEDDING
8235 202B   RIGHT-TO-LEFT EMBEDDING
8236 202C   POP DIRECTIONAL FORMATTING
8237 202D   LEFT-TO-RIGHT OVERRIDE
8238 202E   RIGHT-TO-LEFT OVERRIDE
8239 202F   NARROW NON-BREAK SPACE
8240 2030 &permil; PER MILLE SIGN
8241 2031   PER TEN THOUSAND SIGN
8242 2032 &prime; PRIME
8243 2033 &Prime; DOUBLE PRIME
8244 2034   TRIPLE PRIME
8245 2035   REVERSED PRIME
8246 2036   REVERSED DOUBLE PRIME
8247 2037   REVERSED TRIPLE PRIME
8248 2038   CARET
8249 2039 &lsaquo; SINGLE LEFT-POINTING ANGLE QUOTATION MARK
8250 203A &rsaquo; SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
8251 203B   REFERENCE MARK
8252 203C   DOUBLE EXCLAMATION MARK
8253 203D   INTERROBANG
8254 203E &oline; OVERLINE
8255 203F   UNDERTIE
8256 2040   CHARACTER TIE
8257 2041   CARET INSERTION POINT
8258 2042   ASTERISM
8259 2043   HYPHEN BULLET
8260 2044 &frasl; FRACTION SLASH
8261 2045   LEFT SQUARE BRACKET WITH QUILL
8262 2046   RIGHT SQUARE BRACKET WITH QUILL
8263 2047   DOUBLE QUESTION MARK
8264 2048   QUESTION EXCLAMATION MARK
8265 2049   EXCLAMATION QUESTION MARK
8266 204A   TIRONIAN SIGN ET
8267 204B   REVERSED PILCROW SIGN
8268 204C   BLACK LEFTWARDS BULLET
8269 204D   BLACK RIGHTWARDS BULLET
8270 204E   LOW ASTERISK
8271 204F   REVERSED SEMICOLON
8272 2050   CLOSE UP
8273 2051   TWO ASTERISKS ALIGNED VERTICALLY
8274 2052   COMMERCIAL MINUS SIGN
8275 2053   SWUNG DASH
8276 2054   INVERTED UNDERTIE
8277 2055   FLOWER PUNCTUATION MARK
8278 2056   THREE DOT PUNCTUATION
8279 2057   QUADRUPLE PRIME
8280 2058   FOUR DOT PUNCTUATION
8281 2059   FIVE DOT PUNCTUATION
8282 205A   TWO DOT PUNCTUATION
8283 205B   FOUR DOT MARK
8284 205C   DOTTED CROSS
8285 205D   TRICOLON
8286 205E   VERTICAL FOUR DOTS
8287 205F   MEDIUM MATHEMATICAL SPACE
8288 2060   WORD JOINER
8289 2061   FUNCTION APPLICATION
8290 2062   INVISIBLE TIMES
8291 2063   INVISIBLE SEPARATOR
8292 2064   INVISIBLE PLUS
8294 2066   LEFT-TO-RIGHT ISOLATE
8295 2067   RIGHT-TO-LEFT ISOLATE
8296 2068   FIRST STRONG ISOLATE
8297 2069   POP DIRECTIONAL ISOLATE
8298 206A   INHIBIT SYMMETRIC SWAPPING
8299 206B   ACTIVATE SYMMETRIC SWAPPING
8300 206C   INHIBIT ARABIC FORM SHAPING
8301 206D   ACTIVATE ARABIC FORM SHAPING
8302 206E   NATIONAL DIGIT SHAPES
8303 206F   NOMINAL DIGIT SHAPES

版权所有 © 小码哥的IT人生
Copyright © phpcodeweb All Rights Reserved
ICP备案号:苏ICP备17019232号-2  

苏公网安备 32030202000762号

© 2021-2024