Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the new and commonly used tags in HTML5

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

Today Xiaobian to share with you what the new tags and common tags in HTML5 have related knowledge points, detailed content, clear logic, I believe most people still know too much about this knowledge, so share this article for your reference, I hope you have something to gain after reading this article, let's learn about it together.

HTML5 new structural elements are divided into main structural elements and non-main structural elements

1. Body structure elements include article, section, nav, aside, time

2. Non-body structural elements include header, hgroup, footer, address

I. Main structural elements

article

Article tag, semantically seen as a document, page, its usage is as follows:

It's usually an article, a page, a separate, complete content module.

It usually comes with a title and is placed in the header tag.

Article elements can be nested within each other

The frequency of use is extremely high, emphasizing independence, and paying more attention to the use of header tags.

copy code

The code is as follows:

It's my label.

I am a paragraph.

my content

section

The section tag, semantically seen as a part, is used as follows:

A separate block for page content, often a paragraph of an article.

Usually composed of content and title, content without title is not recommended to use section

Low frequency of use, emphasis on segmentation and blocking.

Note: The authoritative guide to HTML5 and CSS3 explains that when a container needs to be styled or scripted to define behavior, it is recommended to use div instead of section, and do not use section as a container for setting styles.

copy code

The code is as follows:

fruit

Apple

Apple is sown?

orange

Oranges are sprinkled?

Chinese figure

Three Kingdoms, Jin Dynasty, Northern and Southern Dynasties

three countries

Fierce general Fierce general Fierce general

two Jin

Fierce general Fierce general Fierce general

nav

The nav tag, semantically known as navigation, is used as follows:

A group of links usually used as page navigation

Sidebar navigation

High frequency of use.

copy code

The code is as follows:

menu 1

menu 2

menu 3

aside

The aside tag, semantically seen as beside or on the side, is used as follows:

When used in an article tag, ancillary information that is the main content, such as relevant references, noun explanations, etc.

When used outside the article tag, it is used as an auxiliary information part of the page or site, such as sidebar, friendship link part of blog, advertisement area, etc.

Low frequency of use.

copy code

The code is as follows:

Who is Ma Yun?

Ma Yun, male, born on October 15,1964 in Hangzhou City, Zhejiang Province, famous Chinese entrepreneur, founder of Alibaba Group, Taobao and Alipay...

resources

Baidu, Wikipedia...

Old Zhao's blog

Ghost brother's blog

Uncle Bill's Blog

time

The time tag, semantically time, is used as follows:

represents a time or date in 24 hours.

Allow time difference when indicating time

Date and time can be defined in many formats

Low frequency of use.

copy code

The code is as follows:

6 March 2014

6 March 2014 20:00

6 March 2014 20:00

II. Non-subject structural elements

header

header tag, semantically seen as the header of a document, is used as follows:

A structural element with guidance and navigation functions

The title of a section of content, usually placed on an entire page or within a page

There is no limit to the number of header tags in a web page.

The frequency of use is extremely high and relatively easy to understand.

copy code

The code is as follows:

I'm Big Head.

I'm the neck.

I am the body.

hgroup

The hgroup tag, semantically considered a title group, is used as follows:

As a child element of the header tag

hgroup is only used when a content module includes a main title and at least one subtitle

H2-H7 elements are usually grouped

High frequency of use.

copy code

The code is as follows:

I am Liu Bei

I am Guan Yu

I am Zhang Fei

Lu Bu was shocked.

footer

The footer tag, semantically a footnote to a document, is used as follows:

Footnotes to a content block

Usually the content is contact information, related reading, copyright information, etc

High frequency of use, relatively easy to understand.

copy code

The code is as follows:

Lu Bu was shocked.

About the Three Kingdoms

map information

game strategy

address

The address tag, semantically an address, is used as follows:

Contact information for presentation in documents

Usually the content is author, website link, email address, telephone number, etc.

Low frequency of use.

copy code

The code is as follows:

Author: Zhang Sanfeng

Address: Wudang Mountain

Contact: 1247

The above is "What are the new and common tags in HTML5?" All the contents of this article, thank you for reading! I believe everyone has a great harvest after reading this article. Xiaobian will update different knowledge for everyone every day. If you want to learn more knowledge, please pay attention to the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report