search
HomeWeb Front-endHTML TutorialA brief discussion of html semantic tags, Html5 new semantic tags_html/css_WEB-ITnose

Html semantic tags, new semantic tags in Html5

During my study, I compiled some knowledge about semantic tags in HTML, but the list is not comprehensive.

I hope you all have it If you have any new insights, you can leave me a message and I will add them. Thank you all

1. What are semantic tags?

So what is semantic tags? To put it simply, understand each tag. The purpose of each tag (under what circumstances can I use this tag?) For example,

The title of the article on the webpage can use the title tag, and the of each column on the webpage can be used 🎜>Column nameYou can also use title tags.

The content paragraphs in the article must be placed in the paragraph tag . If there is text that you want to emphasize in the article, you can use the em tag to express emphasis, etc.

2. Why use semantic tags?

1. It is easier to be indexed by search engines.

2. Make it easier for screen readers to read web content.

3. Can better reflect the theme of the page

4. Better compatibility, supports more network devices

3.html semantic tags

1): Tag: Implement hyperlink

Emphasize: the role of the title attribute. When the mouse slides over the link text, the text content of this attribute will be displayed. This attribute plays a great role in actual web development. It mainly facilitates search engines to understand the content of the link address (more semantically friendly)

2):

tag: Article paragraphs are placed in the

tags

3): tag: article title, column title is represented by

title tag There are 6 in total, h1, h2, h3, h4, h5, and h6 are first-level headings, second-level headings, third-level headings, fourth-level headings, fifth-level headings, and sixth-level headings respectively. And in descending order of importance.

is the highest level.

4): and tags: emphasize certain words

but both There is a difference in the tone of emphasis: means emphasis, means stronger emphasis. And in the browser, is represented by italic by default, and is represented by bold.

Compared with the two tags, domestic front-end programmers currently prefer to use to express emphasis.

5): Tag: short text quote

Note that the text to be quoted does not need to be enclosed in double quotes , the browser will The q tag automatically adds double quotes

6):

tag: long text quote

Note that the browser does not accept blockquote> The parsing of the tag is indentation style

7):

tag: add address information to the web page

8):

    Tag: unordered list

    9):

    Tag: ordered list

    10 ):

    Tag: Add a title and summary to the table

    The content of the summary will not be displayed in the browser. Its function is to increase the readability (semanticization) of the table, enable search engines to better understand the table content, and also enable screen readers to better help special users read the table content.

    Grammar:

    The title is used to describe the content of the table. The title is displayed at the top of the table.

    Syntax:

    4.Html5 semantic tags

    1):article tag: Load and display an independent article content.

    For example, a complete forum post, a website news, a blog article, etc., a user comment, etc. artilce can be nested, then the inner artilce has a subordinate relationship with the outer article tag .

    For example, a blog post can be displayed as article, and then some comments can be embedded in it in the form of article.

    <article><h1 id="文章标题">文章标题</h1>这是一篇文章   <article>评论1...</article>    <article>评论2...</article></article>

    2):section tag: Define the section (section, section) in the document. Such as chapters, headers, footers, or other parts of the document.

    Example:

    <section>   <h1 id="章节一">章节一</h1>    <p>详细内容...</p></section><section>   <h1 id="章节二">章节二</h1>    <p>详细内容...</p></section>

    3): aside tag: used to load non-text content. Such as ads, groups of links, sidebars, etc.

    4): hgroup tag: used to combine title elements (h1-h6) of web pages or sections.

    For example, if you have consecutive h-series tag elements in a section, you can enclose them with hgroup.

    <hgroup><h1 id="标题">标题1</h1><h2 id="标题">标题2</h2></hgroup>

    5): header tag: defines the page combination of the document, usually some guidance and navigation information.

    6):footer tag: defines the footer of section or document.

    Typically, this element will contain the author's name, the date the document was created, and/or contact information.

    Example:

    <footer> &copy; 2012 Baidu 使用百度前必读 京ICP证030173号 </footer>

     

    7):nav 标签:导航链接放在nav标签里。

    nav标签里应该放入一些当前页面的主要导航链接。

    例如在页脚显示一个站点的导航链接(如首页,服务信息页面,版权信息页面等等),就可以使用nav标签,当然,这不是必须的。

     

    8):time 标签:定义公历的时间(24 小时制)或日期,时间和时区偏移是可选的。

    该元素能够以机器可读的方式对日期和时间进行编码,搜索引擎也能够生成更智能的搜索结果

     

    9):mark 标签:定义带有记号的文本。请在需要突出显示文本时使用 标签。

     

    10):figure标签:规定独立的流内容(图像、图表、照片、代码等等)。

    figure 元素的内容应该与主内容相关,但如果被删除,则不应对文档流产生影响。

     

    11):figcaption 标签:定义 figure 元素的标题(caption)。

    "figcaption" 元素应该被置于 "figure" 元素的第一个或最后一个子元素的位置。

    实例:

    <figure> <figcaption>美女图片</figcaption> <img  src="/static/imghwm/default1.png"  data-src="meizi.jpg"  class="lazy"    style="max-width:90%"  style="max-width:90%" / alt="A brief discussion of html semantic tags, Html5 new semantic tags_html/css_WEB-ITnose" ></figure>

     

    title text
Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
The Future of HTML, CSS, and JavaScript: Web Development TrendsThe Future of HTML, CSS, and JavaScript: Web Development TrendsApr 19, 2025 am 12:02 AM

The future trends of HTML are semantics and web components, the future trends of CSS are CSS-in-JS and CSSHoudini, and the future trends of JavaScript are WebAssembly and Serverless. 1. HTML semantics improve accessibility and SEO effects, and Web components improve development efficiency, but attention should be paid to browser compatibility. 2. CSS-in-JS enhances style management flexibility but may increase file size. CSSHoudini allows direct operation of CSS rendering. 3.WebAssembly optimizes browser application performance but has a steep learning curve, and Serverless simplifies development but requires optimization of cold start problems.

HTML: The Structure, CSS: The Style, JavaScript: The BehaviorHTML: The Structure, CSS: The Style, JavaScript: The BehaviorApr 18, 2025 am 12:09 AM

The roles of HTML, CSS and JavaScript in web development are: 1. HTML defines the web page structure, 2. CSS controls the web page style, and 3. JavaScript adds dynamic behavior. Together, they build the framework, aesthetics and interactivity of modern websites.

The Future of HTML: Evolution and Trends in Web DesignThe Future of HTML: Evolution and Trends in Web DesignApr 17, 2025 am 12:12 AM

The future of HTML is full of infinite possibilities. 1) New features and standards will include more semantic tags and the popularity of WebComponents. 2) The web design trend will continue to develop towards responsive and accessible design. 3) Performance optimization will improve the user experience through responsive image loading and lazy loading technologies.

HTML vs. CSS vs. JavaScript: A Comparative OverviewHTML vs. CSS vs. JavaScript: A Comparative OverviewApr 16, 2025 am 12:04 AM

The roles of HTML, CSS and JavaScript in web development are: HTML is responsible for content structure, CSS is responsible for style, and JavaScript is responsible for dynamic behavior. 1. HTML defines the web page structure and content through tags to ensure semantics. 2. CSS controls the web page style through selectors and attributes to make it beautiful and easy to read. 3. JavaScript controls web page behavior through scripts to achieve dynamic and interactive functions.

HTML: Is It a Programming Language or Something Else?HTML: Is It a Programming Language or Something Else?Apr 15, 2025 am 12:13 AM

HTMLisnotaprogramminglanguage;itisamarkuplanguage.1)HTMLstructuresandformatswebcontentusingtags.2)ItworkswithCSSforstylingandJavaScriptforinteractivity,enhancingwebdevelopment.

HTML: Building the Structure of Web PagesHTML: Building the Structure of Web PagesApr 14, 2025 am 12:14 AM

HTML is the cornerstone of building web page structure. 1. HTML defines the content structure and semantics, and uses, etc. tags. 2. Provide semantic markers, such as, etc., to improve SEO effect. 3. To realize user interaction through tags, pay attention to form verification. 4. Use advanced elements such as, combined with JavaScript to achieve dynamic effects. 5. Common errors include unclosed labels and unquoted attribute values, and verification tools are required. 6. Optimization strategies include reducing HTTP requests, compressing HTML, using semantic tags, etc.

From Text to Websites: The Power of HTMLFrom Text to Websites: The Power of HTMLApr 13, 2025 am 12:07 AM

HTML is a language used to build web pages, defining web page structure and content through tags and attributes. 1) HTML organizes document structure through tags, such as,. 2) The browser parses HTML to build the DOM and renders the web page. 3) New features of HTML5, such as, enhance multimedia functions. 4) Common errors include unclosed labels and unquoted attribute values. 5) Optimization suggestions include using semantic tags and reducing file size.

Understanding HTML, CSS, and JavaScript: A Beginner's GuideUnderstanding HTML, CSS, and JavaScript: A Beginner's GuideApr 12, 2025 am 12:02 AM

WebdevelopmentreliesonHTML,CSS,andJavaScript:1)HTMLstructurescontent,2)CSSstylesit,and3)JavaScriptaddsinteractivity,formingthebasisofmodernwebexperiences.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.