HTML common tags
Common HTML tags:
HTML document format:
First of all, HTML is a hypertext tag language, which is the basis for making web pages.
Secondly, the HTML document contains at least basic and paired , ,
Finally, the attribute tag is indispensable in HTML documents, describing some attributes of HTML web pages and converting character encodings. Generally, the international encoding utf-8 is chosen.
<span style="color: #008080"> 1</span> <span style="color: #0000ff"><span style="color: #ff00ff">DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"</span><span style="color: #0000ff">></span> <span style="color: #008080"> 2</span> <span style="color: #0000ff"><span style="color: #800000">html </span><span style="color: #ff0000">xmlns</span><span style="color: #0000ff">="http://www.w3.org/1999/xhtml"</span><span style="color: #0000ff">></span> <span style="color: #008080"> 3</span> <span style="color: #0000ff"><span style="color: #800000">head</span><span style="color: #0000ff">></span> <span style="color: #008080"> 4</span> <span style="color: #0000ff"><span style="color: #800000">meta </span><span style="color: #ff0000">http-equiv</span><span style="color: #0000ff">="Content-Type"</span><span style="color: #ff0000"> content</span><span style="color: #0000ff">="text/html; charset=utf-8"</span> <span style="color: #0000ff">/></span> <span style="color: #008080"> 5</span> <span style="color: #0000ff"><span style="color: #800000">title</span><span style="color: #0000ff">></span>我是网页标题<span style="color: #0000ff"></span><span style="color: #800000">title</span><span style="color: #0000ff">></span> <span style="color: #008080"> 6</span> <span style="color: #0000ff"></span><span style="color: #800000">head</span><span style="color: #0000ff">></span> <span style="color: #008080"> 7</span> <span style="color: #0000ff"><span style="color: #800000">body</span><span style="color: #0000ff">></span> <span style="color: #008080"> 8</span> <span style="color: #000000"> 我是网页内容。 </span><span style="color: #008080"> 9</span> <span style="color: #0000ff"></span><span style="color: #800000">body</span><span style="color: #0000ff">></span> <span style="color: #008080">10</span> <span style="color: #0000ff"></span><span style="color: #800000">html</span><span style="color: #0000ff">></span></span></span></span></span></span></span>
HTML document parsing:
1. root tag, which is the root tag of the HTML document, and all content on the page must be included .
2. Head tag, the document in it will not be displayed on the web page, the purpose is for the HTML common tagsowser to parse the attributes in it.
3.
4. content tag, which is also the content presented on the web page.
1. The most commonly used tags:
1.... Title tag ▷ Set the title text in the web page. After setting, it will be displayed in black and bold. The code and effect are as follows:
<span style="color: #008080"> 1</span> <span style="color: #0000ff"><span style="color: #800000">html</span><span style="color: #0000ff">></span> <span style="color: #008080"> 2</span> <span style="color: #0000ff"><span style="color: #800000">head</span><span style="color: #0000ff">></span> <span style="color: #008080"> 3</span> <span style="color: #0000ff"><span style="color: #800000">meta </span><span style="color: #ff0000">http-equiv</span><span style="color: #0000ff">="Content-Type"</span><span style="color: #ff0000"> content</span><span style="color: #0000ff">="text/html; charset=utf-8"</span> <span style="color: #0000ff">/><img src="/static/imghw/default1.png" data-src="http://images2015.cnblogs.com/blog/1072336/201612/1072336-20161204204948381-163635024.png" class="lazy" style="max-width:90%" alt="" style="max-width:90%" style="max-width:90%"></span></span></span></span>
<span style="color: #008080"> 4</span> <span style="color: #0000ff"><span style="color: #800000">title</span><span style="color: #0000ff">><span style="color: #000000">PB_</span></span>6大标题类型<span style="color: #0000ff"></span><span style="color: #800000">title</span><span style="color: #0000ff">></span> <span style="color: #008080"> 5</span> <span style="color: #0000ff"></span><span style="color: #800000">head</span><span style="color: #0000ff">></span> <span style="color: #008080"> 6</span> <span style="color: #0000ff"><span style="color: #800000">body</span><span style="color: #0000ff">></span> <span style="color: #008080"> 7</span> <span style="color: #0000ff"><span style="color: #800000">h1</span><span style="color: #0000ff">></span>我是标题h1<span style="color: #0000ff"></span><span style="color: #800000">h1</span><span style="color: #0000ff">></span> <span style="color: #008080"> 8</span> <span style="color: #0000ff"><span style="color: #800000">h2</span><span style="color: #0000ff">></span>我是标题h1<span style="color: #0000ff"></span><span style="color: #800000">h2</span><span style="color: #0000ff">></span> <span style="color: #008080"> 9</span> <span style="color: #0000ff"><span style="color: #800000">h3</span><span style="color: #0000ff">></span>我是标题h1<span style="color: #0000ff"></span><span style="color: #800000">h3</span><span style="color: #0000ff">></span> <span style="color: #008080">10</span> <span style="color: #0000ff"><span style="color: #800000">h4</span><span style="color: #0000ff">></span>我是标题h1<span style="color: #0000ff"></span><span style="color: #800000">h4</span><span style="color: #0000ff">></span> <span style="color: #008080">11</span> <span style="color: #0000ff"><span style="color: #800000">h5</span><span style="color: #0000ff">></span>我是标题h1<span style="color: #0000ff"></span><span style="color: #800000">h5</span><span style="color: #0000ff">></span> <span style="color: #008080">12</span> <span style="color: #0000ff"><span style="color: #800000">h6</span><span style="color: #0000ff">></span>我是标题h1<span style="color: #0000ff"></span><span style="color: #800000">h6</span><span style="color: #0000ff">></span> <span style="color: #008080">13</span> <span style="color: #0000ff"></span><span style="color: #800000">body</span><span style="color: #0000ff">></span> <span style="color: #008080">14</span> <span style="color: #0000ff"></span><span style="color: #800000">html</span><span style="color: #0000ff">></span></span></span></span></span></span></span></span></span>
The code is as follows:
<span style="color: #008080">1</span> <span style="color: #0000ff"><span style="color: #800000">body</span><span style="color: #0000ff">></span>
<span style="color: #008080">2</span> <span style="color: #0000ff"><span style="color: #800000">p</span><span style="color: #0000ff">></span>我是一个段落。<span style="color: #0000ff"></span><span style="color: #800000">p</span><span style="color: #0000ff">></span>
<span style="color: #008080">3</span> <span style="color: #0000ff"></span><span style="color: #800000">body</span><span style="color: #0000ff">></span></span></span>
<span style="color: #008080">1</span> <span style="color: #0000ff"><span style="color: #800000">body</span><span style="color: #0000ff">></span>
<span style="color: #008080">2</span> 欢迎来到pengbo518博客园!<span style="color: #0000ff"><span style="color: #800000">HTML common tags </span><span style="color: #0000ff">/></span><span style="color: #000000"> 我是强制换行标签喔!<img src="/static/imghw/default1.png" data-src="http://images2015.cnblogs.com/blog/1072336/201612/1072336-20161203000631271-945862362.png" class="lazy" style="max-width:90%" alt="HTML common tags" style="max-width:90%" style="max-width:90%"></span></span></span>
<span style="color: #008080">3</span> <span style="color: #0000ff"></span><span style="color: #800000">body</span><span style="color: #0000ff">></span>
are as follows:
<span style="color: #008080">1</span> <span style="color: #0000ff"><span style="color: #800000">body</span><span style="color: #0000ff">></span>
<span style="color: #008080">2</span> <span style="color: #000000"> 你是我的月亮
</span><span style="color: #008080">3</span> <span style="color: #0000ff"><span style="color: #800000">hr </span><span style="color: #0000ff">/></span>
<span style="color: #008080">4</span> <span style="color: #000000"> 我是地球<img src="/static/imghw/default1.png" data-src="http://images2015.cnblogs.com/blog/1072336/201612/1072336-20161203001938631-1115592738.png" class="lazy" style="max-width:90%" alt="" style="max-width:90%" style="max-width:90%"></span></span></span>
<span style="color: #008080">5</span> <span style="color: #0000ff"></span><span style="color: #800000">body</span><span style="color: #0000ff">></span>
6、 7、 8、 9、 10. Font shape label [bold] ▷ Set the font to be bold. The code and effect are as follows: 11, Font shape tag [italic] Set the font to appear in italics. The code and effect are as follows:
12、 Font shapeLabel [underline] ▷ Set font with Underlined. The code and effect are as follows: 13、 Font shapeLabel [subscript] ▷ Set text as The subscript is displayed. The code and effect are as follows: 14、 Font ShapeLabel [Superscript] ▷ Set text as Superscript is displayed. The code and effect are as follows: ** 10、11、12、13、14 ** ▷ 代码及效果集合如下: 15、 字体标签 ▷ 设置字体、字号、颜色等。代码语法及效果如下: 语法:文本 16、 语法: 17、超链接标签 ▷ 创建超链接,href属性来设置页面的链接地址。代码语法及效果如下: 【Supplement】1. File path: 1. Absolute path: ▷ Absolute path refers to the one with domain name or drive letter Complete route. 2. Relative path: ▷ A relative path refers to the path relationship between the path of this file and other files (or folders). For example: ① If two are in the same folder, link in index.html pengbo518.html You can use the following method in index.html Link: href=" pengbo518.html ">pengbo518 Blog Park If pengbo518.html The file is index.html The superior path of the file can be as follows in index.html Way links:
">pengbo518 Blog Garden II. Anchor point: ▷ Setting the anchor point is usually placed on a specific topic or at the top of the document. Then create an anchor link, through which you can quickly navigate to the specified location.
1 body>
2 center>
3 我就在网页中间显示,你能怎么滴我?嗯哼
4 center>
<span style="color: #008080">5</span> <span style="color: #0000ff"></span><span style="color: #800000">body</span><span style="color: #0000ff">></span>
有序列表标签【注意】要套
<span style="color: #008080">1</span> <span style="color: #0000ff"><span style="color: #800000">body</span><span style="color: #0000ff">></span>
<span style="color: #008080">2</span> <span style="color: #0000ff"><span style="color: #800000">ol</span><span style="color: #0000ff">></span>
<span style="color: #008080">3</span> <span style="color: #0000ff"><span style="color: #800000">li</span><span style="color: #0000ff">></span>我是第1列<span style="color: #0000ff"></span><span style="color: #800000">li</span><span style="color: #0000ff">></span>
<span style="color: #008080">4</span> <span style="color: #0000ff"><span style="color: #800000">li</span><span style="color: #0000ff">></span>我是第2列<span style="color: #0000ff"></span><span style="color: #800000">li</span><span style="color: #0000ff">></span>
<span style="color: #008080">5</span> <span style="color: #0000ff"><span style="color: #800000">li</span><span style="color: #0000ff">></span>我是第3列<span style="color: #0000ff"></span><span style="color: #800000">li</span><span style="color: #0000ff">></span>
<span style="color: #008080">6</span> <span style="color: #0000ff"></span><span style="color: #800000">ol</span><span style="color: #0000ff">><img src="/static/imghw/default1.png" data-src="http://images2015.cnblogs.com/blog/1072336/201612/1072336-20161204204319599-592154556.png" class="lazy" style="max-width:90%" alt="" style="max-width:90%" style="max-width:90%"></span></span></span></span></span></span>
<span style="color: #008080">7</span> <span style="color: #0000ff"></span><span style="color: #800000">body</span><span style="color: #0000ff">></span>
无序列表标签【注意】要套
<span style="color: #008080">1</span> <span style="color: #0000ff"><span style="color: #800000">body</span><span style="color: #0000ff">></span>
<span style="color: #008080">2</span> <span style="color: #0000ff"><span style="color: #800000">ul</span><span style="color: #0000ff">></span>
<span style="color: #008080">3</span> <span style="color: #0000ff"><span style="color: #800000">li</span><span style="color: #0000ff">></span>我是第1列<span style="color: #0000ff"></span><span style="color: #800000">li</span><span style="color: #0000ff">></span>
<span style="color: #008080">4</span> <span style="color: #0000ff"><span style="color: #800000">li</span><span style="color: #0000ff">></span>我是第2列<span style="color: #0000ff"></span><span style="color: #800000">li</span><span style="color: #0000ff">></span>
<span style="color: #008080">5</span> <span style="color: #0000ff"><span style="color: #800000">li</span><span style="color: #0000ff">></span>我是第3列<span style="color: #0000ff"></span><span style="color: #800000">li</span><span style="color: #0000ff">></span>
<span style="color: #008080">6</span> <span style="color: #0000ff"></span><span style="color: #800000">ul</span><span style="color: #0000ff">><img src="/static/imghw/default1.png" data-src="http://images2015.cnblogs.com/blog/1072336/201612/1072336-20161204204218693-875385495.png" class="lazy" style="max-width:90%" alt=""></span></span></span></span></span></span>
<span style="color: #008080">7</span> <span style="color: #0000ff"></span><span style="color: #800000">body</span><span style="color: #0000ff">></span>
自定义列表标签【注意】要套
列表项使用。 ▷ 设置网页中的内容,使文档无序排列。代码及效果如下:
<span style="color: #008080">1</span> <span style="color: #0000ff"><span style="color: #800000">body</span><span style="color: #0000ff">></span>
<span style="color: #008080">2</span> <span style="color: #0000ff"><span style="color: #800000">dl</span><span style="color: #0000ff">></span>
<span style="color: #008080">3</span> <span style="color: #0000ff"><span style="color: #800000">dt</span><span style="color: #0000ff">></span>我是自定义标题1<span style="color: #0000ff"></span><span style="color: #800000">dt</span><span style="color: #0000ff">><img src="/static/imghw/default1.png" data-src="http://images2015.cnblogs.com/blog/1072336/201612/1072336-20161204205523490-2070875690.png" class="lazy" style="max-width:90%" alt=""></span></span></span></span>
<span style="color: #008080">4</span> <span style="color: #0000ff"><span style="color: #800000">dd</span><span style="color: #0000ff">></span>我是自定义描述1<span style="color: #0000ff"></span><span style="color: #800000">dd</span><span style="color: #0000ff">></span>
<span style="color: #008080">5</span> <span style="color: #0000ff"><span style="color: #800000">dt</span><span style="color: #0000ff">></span>我是自定义标题2<span style="color: #0000ff"></span><span style="color: #800000">dt</span><span style="color: #0000ff">></span>
<span style="color: #008080">6</span> <span style="color: #0000ff"><span style="color: #800000">dd</span><span style="color: #0000ff">></span>我是自定义描述2<span style="color: #0000ff"></span><span style="color: #800000">dd</span><span style="color: #0000ff">></span>
<span style="color: #008080">7</span> <span style="color: #0000ff"></span><span style="color: #800000">dl</span><span style="color: #0000ff">></span>
<span style="color: #008080">8</span> <span style="color: #0000ff"></span><span style="color: #800000">body</span><span style="color: #0000ff">></span></span></span></span>
<span style="color: #008080">1</span> <span style="color: #0000ff"><span style="color: #800000">body</span><span style="color: #0000ff">></span>
<span style="color: #008080">2</span> <span style="color: #0000ff"><span style="color: #800000">pre</span><span style="color: #0000ff">></span>
<span style="color: #008080">3</span> <span style="color: #000000"> 您好!
</span><span style="color: #008080">4</span> <span style="color: #000000"> 欢迎您来到 pengbo518 博客园<img src="/static/imghw/default1.png" data-src="http://images2015.cnblogs.com/blog/1072336/201612/1072336-20161204210310131-1915429582.png" class="lazy" style="max-width:90%" alt=""></span></span></span>
<span style="color: #008080">5</span> <span style="color: #000000"> 感谢您对我的关注支持!
</span><span style="color: #008080">6</span> <span style="color: #000000"> 让我们共同学习探讨吧!
</span><span style="color: #008080">7</span> <span style="color: #0000ff"></span><span style="color: #800000">pre</span><span style="color: #0000ff">></span>
<span style="color: #008080">8</span> <span style="color: #0000ff"></span><span style="color: #800000">body</span><span style="color: #0000ff">></span>
<span style="color: #008080">1</span> <span style="color: #0000ff"><span style="color: #800000">body</span><span style="color: #0000ff">></span>
<span style="color: #008080">2</span> <span style="color: #0000ff"><span style="color: #800000">b</span><span style="color: #0000ff">></span>《静夜思》<span style="color: #0000ff"></span><span style="color: #800000">b</span><span style="color: #0000ff">></span>
<span style="color: #008080">3</span> <span style="color: #0000ff"><span style="color: #800000">sub</span><span style="color: #0000ff">></span>李白<span style="color: #0000ff"></span><span style="color: #800000">sub</span><span style="color: #0000ff">></span>
<span style="color: #008080">4</span> <span style="color: #0000ff"><span style="color: #800000">p</span><span style="color: #0000ff">></span>
<span style="color: #008080">5</span> <span style="color: #0000ff"><span style="color: #800000">i</span><span style="color: #0000ff">></span>床前明月光,疑是地上霜。<span style="color: #0000ff"></span><span style="color: #800000">i</span><span style="color: #0000ff">></span> <span style="color: #008080">6</span> <span style="color: #0000ff"><span style="color: #800000">u</span><span style="color: #0000ff">></span>举头望明月,低头思故乡。<span style="color: #0000ff"></span><span style="color: #800000">u</span><span style="color: #0000ff">></span> </span></span></span></span></span></span>
<em id="__mceDel"><span style="color: #008080">7</span> <span style="color: #0000ff"><span style="color: #800000">sup</span><span style="color: #0000ff">></span>pengbo518<span style="color: #0000ff"></span><span style="color: #800000">sup</span><span style="color: #0000ff">></span>
<span style="color: #008080">8</span> <span style="color: #0000ff"></span><span style="color: #800000">p</span><span style="color: #0000ff">></span>
<span style="color: #008080">9</span> <span style="color: #0000ff"></span><span style="color: #800000">body</span><span style="color: #0000ff">></span></span></em>
<span style="color: #008080"> 1</span> <span style="color: #0000ff"><span style="color: #800000">body</span><span style="color: #0000ff">></span>
<span style="color: #008080"> 2</span> <span style="color: #0000ff"><span style="color: #800000">font </span><span style="color: #ff0000">size</span><span style="color: #0000ff">="+2"</span><span style="color: #ff0000"> face</span><span style="color: #0000ff">="Arial, Helvetica, sans-serif"</span><span style="color: #ff0000"> color</span><span style="color: #0000ff">="#FF0000"</span><span style="color: #0000ff">></span>
<span style="color: #008080"> 3</span> <span style="color: #000000"> HTML I love you !
</span><span style="color: #008080"> 4</span> <span style="color: #0000ff"></span><span style="color: #800000">font</span><span style="color: #0000ff">><img src="/static/imghw/default1.png" data-src="http://images2015.cnblogs.com/blog/1072336/201612/1072336-20161204231516740-1821234010.png" class="lazy" style="max-width:90%" alt=""></span></span></span>
<span style="color: #008080"> 5</span> <span style="color: #0000ff"><span style="color: #800000">HTML common tags </span><span style="color: #0000ff">/></span>
<span style="color: #008080"> 6</span> <span style="color: #0000ff"><span style="color: #800000">font </span><span style="color: #ff0000">size</span><span style="color: #0000ff">="+3"</span><span style="color: #ff0000"> face</span><span style="color: #0000ff">="隶书"</span><span style="color: #ff0000"> color</span><span style="color: #0000ff">="#0000FF"</span><span style="color: #0000ff">></span>
<span style="color: #008080"> 7</span> <span style="color: #000000"> 热爱生活,热爱博客园
</span><span style="color: #008080"> 8</span> <span style="color: #0000ff"></span><span style="color: #800000">font</span><span style="color: #0000ff">></span>
<span style="color: #008080"> 9</span> <span style="color: #0000ff"><span style="color: #800000">body<span style="color: #0000ff">></span></span></span>
</span></span>
图像标签 ▷ 设置字体、字号、颜色等。代码语法及效果如下:
<span style="color: #008080">1</span> <span style="color: #0000ff"><span style="color: #800000">body</span><span style="color: #0000ff">></span>
<span style="color: #008080">2</span> <span style="color: #0000ff"><span style="color: #800000">img </span><span style="color: #ff0000">src</span><span style="color: #0000ff">="images.png"</span><span style="color: #ff0000"> title</span><span style="color: #0000ff">="小鱼"</span><span style="color: #ff0000"> width</span><span style="color: #0000ff">="70px"</span><span style="color: #ff0000"> height</span><span style="color: #0000ff">="70px"</span><span style="color: #ff0000"> alt</span><span style="color: #0000ff">="鱼干"</span> <span style="color: #0000ff">/><img src="/static/imghw/default1.png" data-src="http://images2015.cnblogs.com/blog/1072336/201612/1072336-20161204232949302-201637373.png" class="lazy" style="max-width:90%" alt=""></span></span></span>
<span style="color: #008080">3</span> <span style="color: #000000"> 我的小鱼干呢
</span><span style="color: #008080">4</span> <span style="color: #0000ff"></span><span style="color: #800000">body</span><span style="color: #0000ff">></span>
<span style="color: #008080">1</span> <span style="color: #0000ff"><span style="color: #800000">body</span><span style="color: #0000ff">></span>
<span style="color: #008080">2</span> <span style="color: #0000ff"><span style="color: #800000">a </span><span style="color: #ff0000">href</span><span style="color: #0000ff">="http://www.baidu.com"</span><span style="color: #0000ff">></span>百度<span style="color: #0000ff"></span><span style="color: #800000">a</span><span style="color: #0000ff">></span><span style="color: #000000">||<img src="/static/imghw/default1.png" data-src="http://images2015.cnblogs.com/blog/1072336/201612/1072336-20161205001152240-1209790473.png" class="lazy" style="max-width:90%" alt=""></span></span></span>
3 a href="http://www.taobao.com">淘宝a>||
4 a href="http://www.cnblogs.com">博客园a>
<span style="color: #008080">5</span> <span style="color: #0000ff"></span><span style="color: #800000">body</span><span style="color: #0000ff">></span>

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

The article discusses the HTML <datalist> element, which enhances forms by providing autocomplete suggestions, improving user experience and reducing errors.Character count: 159

The article discusses using HTML5 form validation attributes like required, pattern, min, max, and length limits to validate user input directly in the browser.

The article discusses the HTML <progress> element, its purpose, styling, and differences from the <meter> element. The main focus is on using <progress> for task completion and <meter> for stati

The article discusses the HTML <meter> element, used for displaying scalar or fractional values within a range, and its common applications in web development. It differentiates <meter> from <progress> and ex

Article discusses best practices for ensuring HTML5 cross-browser compatibility, focusing on feature detection, progressive enhancement, and testing methods.

The article discusses the <iframe> tag's purpose in embedding external content into webpages, its common uses, security risks, and alternatives like object tags and APIs.

This article explains the HTML5 <time> element for semantic date/time representation. It emphasizes the importance of the datetime attribute for machine readability (ISO 8601 format) alongside human-readable text, boosting accessibilit

The article discusses the viewport meta tag, essential for responsive web design on mobile devices. It explains how proper use ensures optimal content scaling and user interaction, while misuse can lead to design and accessibility issues.
