html5 title tags include: 1. title tag, which defines the title of the document; 2. h1, h2, h3, h4, h5, h6 tags, which define the content title; 3. caption tag, which defines the table title; 4 , figcaption tag; 5. legend tag; 6. summary tag.
The operating environment of this tutorial: Windows 7 system, HTML5 version, Dell G3 computer.
html5 title tag
1、
Defines the title in the browser toolbar
Provides the page to be added to the collection The title when clipped
The page title that appears in search engine results
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>php中文网</title> </head> <body> ... </body> </html>
2. to
tag
Because the h element has exact semantics, please carefully choose the appropriate tag level to structure the document. Therefore, please do not use title tags to change the font size within the same line. Instead, we should use cascading style sheet definitions to achieve beautiful display effects.
<h1>这是标题 1</h1> <h2>这是标题 2</h2> <h3>这是标题 3</h3> <h4>这是标题 4</h4> <h5>这是标题 5</h5> <h6>这是标题 6</h6>
3.
caption element defines the table title.
The caption label must immediately follow the table label. You can define only one title per table. Usually the title will be centered above the table.
<table border="1"> <caption>人物信息</caption> <tr> <th>姓名</th> <th>年龄</th> </tr> <tr> <td>Peter</td> <td>20</td> </tr> <tr> <td>Lois</td> <td>20</td> </tr> </table>
4. The
<!DOCTYPE HTML> <html> <body> <p>上海卢浦大桥是当今世界第一钢结构拱桥,是世界上跨度最大的拱形桥。它也是世界上首座完全采用焊接工艺连接的大型拱桥(除合拢接口采用栓接外),现场焊接焊缝总长度达4万多米,接近上海市内环高架路的总长度。卢浦大桥像澳大利亚悉尼的海湾大桥一样具有旅游观光的功能。</p> <figure> <figcaption>黄浦江上的的卢浦大桥</figcaption> <p>拍摄者:W3School 项目组,拍摄时间:2010 年 10 月</p> <img src="/i/shanghai_lupu_bridge.jpg" style="max-width:90%" style="max-width:90%" / alt="What is the title tag in html5" > </figure> </body> </html>
5. The
legend element defines the title (caption) for the fieldset element.<!DOCTYPE HTML> <html> <body> <form> <fieldset> <legend>健康信息</legend> 身高:<input type="text" /> 体重:<input type="text" /> </fieldset> </form> <p>如果表单周围没有边框,说明您的浏览器太老了。</p> </body> </html>
6.
<!DOCTYPE HTML> <html> <body> <details> <summary>HTML 5</summary> This document teaches you everything you have to learn about HTML 5. </details> </body> </html>
html video tutorial"
The above is the detailed content of What is the title tag in html5. For more information, please follow other related articles on the PHP Chinese website!