zoukankan      html  css  js  c++  java
  • 网页(HTML)中的特殊字符

    网页(HTML)中的特殊字符

    (1)一般来说,在HTML中,一个特殊字符有两种表达方式,一种称作数字参考,一种称作实体参考。

    所谓数字参考,就是用数字来表示文档中的特殊字符,通常由前缀“&#”,加上数值,再加上后缀“;”而组成,它可以采用如下两种方式。

    &#D; 其中D是一个十进制数值

    下面是一些特殊字符的数字参考示例:

    © 对应于特殊字符“©”

    ® 对应于特殊字符“®”

    所谓实体参考,实际上就是用有意义的名称来表示特殊字符,通常由前缀“&”,加上字符对应的名称,再加上后缀“;”而组成,其表达方式如下:

    &name; 其中name是一个用于表示字符的名称,它是区分大小写的

    例如,可以使用“©”来表示版权符号“©”,用“®”来表示注册商标符号“®”,很显然,这比数字要容易记忆得多。

    遗憾的是,不是所有的浏览器都能够正确认出采用实体参考方式的特殊字符,但是它们都能够识别出采用数字参考方式的特殊字符,如果可能,对于一些特别不常见的字符,应该使用数字参考方式。

    当然,对于那些常见的特殊字符,使用其实体参考方式是安全的,我们在实际应用中,只要记住这些常用特殊字符字符的实体参考就足够使用了。

    (2)ddd   :表示 1 到 3 位八进制数代表的字符( 1 到 3 位八进制数为其ASCII码值)
    比如 'A'的ASCII码值为 65,表示成八进制为 101 ,所以也可以用'101'表示 'A'。
    xhh :表示 1 到 2 为十六进制数代表的字符。同上。



    以下列出了其中的大部分(从网上搜集而来):

    字符

    数字参考

    实体参考

    描述

    " " " Quotation mark
    &  & & Ampersand
    < &#60; &lt; Less than
    > &#62; &gt; Greater than
     (空白) &#160; &nbsp; Non-breaking space
    ¡ &#161; &iexcl; Inverted exclamation
    ¢ &#162; &cent; Cent sign
    £ &#163; &pound; Pound sterling
    ¤ &#164; &curren; General currency sign
    ¥ &#165; &yen; Yen sign
    ¦ &#166; &brvbar; broken vertical bar
    § &#167; &sect; Section sign
    ¨ &#168; &uml; Di&aelig;resis / umlaut
    © &#169; &copy; Copyright
    ª &#170; &ordf; Feminine ordinal
    « &#171; &laquo; Left angle quote
    ¬ &#172; &not; Not sign
      &#173; &sny; Soft hyphen
    ® &#174; &reg; Registered trademark
    ¯ &#175; &macr; Macron accent
    ° &#176; &deg; Degree sign
    ± &#177; &plusmn; Plus or minus
    ² &#178; &sup2; Superscript two
    ³ &#179; &sup3; Superscript three
    ´ &#180; &acute; Acute accent
    µ &#181; &micro; Micro sign
    &#182; &para; Paragraph sign
    · &#183; &middot; Middle dot
    ¸ &#184; &cedil; Cedilla
    ¹ &#185; &supl; Superscript one
    º &#186; &ordm; Masculine ordinal
    » &#187; &raquo; Right angle quote
    ¼ &#188; &frac14; Fraction one quarter
    ½ &#199; &frac12; Fraction one half
    ¾ &#190; &frac34; Fraction three-quarters
    À &#192; &iquest; Inverted question mark
    À &#192; &Agrave; Capital A, grave accent
    Á &#193; &Aacute; Capital A, acute accent
    Â &#194; &Acirc; Capital A, circumflex
    Ã &#195; &Atilde; Capital A, tilde
    Ä &#196; &Auml; di&aelig;resis / umlau
    Å &#197; &Aring; Capital A, ring
    Æ &#198; &AElig; Capital AE, ligature
    Ç &#199; &Ccedil; Capital C, cedilla
    È &#200; &Egrave; Capital E, grave accent
    É &#201; &Eacute; Capital E, acute accent
    Ê &#202; &Ecirc; Capital E, circumflex
    Ë &#203; &Euml; di&aelig;resis / umlau
    Ì &#204; &Igrave; Capital I, grave accent
    Í &#205; &Iacute; Capital I, acute accent
    Î &#206; &Icirc; Capital I, circumflex
    Ï &#207; &Imul; di&aelig;resis / umlau
    Ð &#208; &ETH; Capital ETH, Icelandic
    Ñ &#209; &Ntilde; Capital N, tilde
    Ò &#210; &Ograve; Capital O, grave accent
    Ó &#211; &Oacute; Capital O, acute accent
    Ô &#212; &Ocirc; Capital O, circumflex
    Õ &#213; &Otilde; Capital O, tilde
    Ö &#214; &Ouml; di&aelig;resis / umlau
    × &#215; &times; Multiplication sign
    Ø &#216; &Oslash; Capital O, slash
    Ù &#217; &Ugrave; Capital U, grave accent
    Ú &#218; &Uacute; Capital U, acute accent
    Û &#219; &Ucirc; Capital U, circumflex
    Ü &#220; &Uuml; di&aelig;resis / umlau
    Ý &#221; &Yacute; Capital Y, acute accent
    Þ &#222; &THORN; Capital Thorn,Icelandic,
    ß &#223; &szlig; German sz
    à &#224; &agrave; Small a, grave accent
    á &#225; &aacute; Small a, acute accent
    â &#226; &acirc; Small a, circumflex
    ã &#227; &atilde; Small a, tilde
    ä &#228; &auml; di&aelig;resis / umlau
    å &#229; &aring; Small a, ring
    æ &#230; &aelig; Small ae ligature
    ç &#231; &ccedil; Small c, cedilla
    è &#232; &egrave; Small e, grave accent
    é &#233; &eacute; Small e, acute accent
    ê &#234; &ecirc; Small e, circumflex
    ë &#235; &euml; di&aelig;resis / umlau
    ì &#236; &igrave; Small i, grave accent
    í &#237; &iacute; Small i, acute accent
    î &#238; &icirc; Small i, circumflex
    ï &#239; &iuml; di&aelig;resis / umlau
    ð &#240; &eth; Small eth, Icelandic
    ñ &#241; &ntilde; Small n, tilde
    ò &#242; &ograve; Small o, grave accent
    ó &#243; &oacute; Small o, acute accent
    ô &#244; &ocirc; Small o, circumflex
    õ &#245; &otilde; Small o, tilde
    ö &#246; &ouml; di&aelig;resis / umlau
    ÷ &#247; &divide; Division sign,
    ø &#248; &oslash; Small o, slash
    ù &#249; &ugrave; Small u, grave accent
    ú &#250; &uacute; Small u, acute accent
    û &#251; &ucirc; Small u, circumflex
    ü &#252; &uuml; di&aelig;resis / umlau
    ý &#253; &yacute; Small y, acute accetn
    þ &#254; &thorn; Small thorn, Icelandic
    ÿ &#255; &yuml; di&aelig;resis / umlaut
  • 相关阅读:
    一元2次方程求解
    react-native 相对项目路径导入组件
    appium页面元素封装(十一)
    pytest高级用法,跳过、失败函数,函数数据参数化(十)
    python之自定义分页代码模板
    pytest高级用法,参数、函数、自动、返回值引用(九)
    pytest.ini文件配置
    因安装pytest最新版本导致,运行pytest命令出错:pluggy.manager.PluginValidationError: unknown hook 'pytest_namespace' in plugin <module 'allure.pytest_plugin' from 'd:\anaconda3\lib\site-packages\allure\pytest_plug
    pytest的使用(八)
    运行pytest,提示编码错误
  • 原文地址:https://www.cnblogs.com/aspirant/p/3571374.html
Copyright © 2011-2022 走看看