码迷,mamicode.com
首页 > Web开发 > 详细

(1)HTML的组成(什么是标签、指令、转义字符、数据)

时间:2019-01-27 16:42:15      阅读:213      评论:0      收藏:0      [点我收藏+]

标签:oci   解析   ott   strong   颜色   height   char   功能   charset   

html的组成:标签+指令+转义字符+数据

 

1、标签

<>内的,以字母开头,可以结合合法字符(- 或者数字),能被浏览器解析的符号

<!DOCTYPE html> #这个是系统预定意义标签
<html lang="en">
<head>
<meta charset="UTF-8">
<title>我的第一个页面</title>
</head>
<body>
<karl><a-1> #这个是自定意义标签
</body>
</html>
PS:如果标签内是这样的格式<1>就是不合法的,要按照标签的合法格式去写
PS:标签的开头是没有/,结尾的标签有/,如<abc>XXXX</abc>

 

为什么要使用标签

标签具有功能:换行、规定编码集、可以控制数据(颜色,大小,字体)、控制位置等

 

2、指令

以<!> #尖括号内以!开头

(1)<!doctype> #规定文档类型

(2)<!-- 注释 -->

 

3、转义字符

以&;包裹  #在&;中间单词简写

                                                                                                      普通转义字符表

字符十进制转义字符
" &#34; &quot;
& &#38; &amp;
< &#60; &lt;
> &#62; &gt;
不断开空格(non-breaking space) &#160; &nbsp;

HTML特殊转义字符对照表
字符十进制转义字符字符十进制转义字符字符十进制转义字符
? &#161; &iexcl; á &#193; &Aacute; á &#225; &aacute;
&#162; &cent; ? &#194; &circ; a &#226 &acirc;
&#163; &pound; ? &#195; &Atilde; ? &#227; &atilde;
¤ &#164; &curren; ? &#196; &Auml ? &#228; &auml;
&#165; &yen; ? &#197; &ring; ? &#229; &aring;
| &#166; &brvbar; ? &#198; &AElig; ? &#230; &aelig;
§ &#167; &sect; ? &#199; &Ccedil; ? &#231; &ccedil;
¨ &#168; &uml; è &#200; &Egrave; è &#232; &egrave;
? &#169; &copy; é &#201; &Eacute; é &#233; &eacute;
a &#170; &ordf; ê &#202; &Ecirc; ê &#234; &ecirc;
? &#171; &laquo; ? &#203; &Euml; ? &#235; &euml;
? &#172; &not; ì &#204; &Igrave; ì &#236; &igrave;
/x7f &#173; &shy; í &#205; &Iacute; í &#237; &iacute;
? &#174; &reg; ? &#206; &Icirc; ? &#238; &icirc;
ˉ &#175; &macr; ? &#207; &Iuml; ? &#239; &iuml;
° &#176; &deg; D &#208; &ETH; e &#240; &ieth;
± &#177; &plusmn; ? &#209; &Ntilde; ? &#241; &ntilde;
2 &#178; &sup2; ò &#210; &Ograve; ò &#242; &ograve;
3 &#179; &sup3; ó &#211; &Oacute; ó &#243; &oacute;
&#180; &acute; ? &#212; &Ocirc; ? &#244; &ocirc;
μ &#181; &micro; ? &#213; &Otilde; ? &#245; &otilde;
? &#182; &para; ? &#214; &Ouml; ? &#246; &ouml;
· &#183; &middot; &times; &#215; &times; ÷ &#247; &divide;
? &#184; &cedil; ? &#216; &Oslash; ? &#248; &oslash;
1 &#185; &sup1; ù &#217; &Ugrave; ù &#249; &ugrave;
o &#186; &ordm; ú &#218; &Uacute; ú &#250; &uacute;
? &#187; &raquo; ? &#219; &Ucirc; ? &#251; &ucirc;
? &#188; &frac14; ü &#220; &Uuml; ü &#252; &uuml;
? &#189; &frac12; Y &#221; &Yacute; y &#253; &yacute;
? &#190; &frac34; T &#222; &THORN; t &#254; &thorn;
? &#191; &iquest; ? &#223; &szlig; ? &#255; &yuml;
à &#192; &Agrave; à &#224; &agrave;  

 

4、数据

---文本、图片、视频、二进制

(1)HTML的组成(什么是标签、指令、转义字符、数据)

标签:oci   解析   ott   strong   颜色   height   char   功能   charset   

原文地址:https://www.cnblogs.com/shizhengquan/p/10326604.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!