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 common grouping elements in HTML5

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

Share

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

This article is about the common grouping elements of HTML5. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

Commonly used grouping elements in html5: 1, p elements for paragraph grouping; 2, div elements for general grouping; 3, blockquote elements; 4, pre elements; 5, hr elements; 6, ul, ol, li elements; 7, dl, dt, dd elements; 8, figure and figcaption elements.

The operating environment of this tutorial: windows7 system, HTML5 version, Dell G3 computer.

Summary of common grouping elements in HTML5

Parsing of HTML5 grouping elements

1 、

< p >

Establish a paragraph

2 、

< div >

General grouping

Because div itself does not have any meaning, div is used as a final solution in the context of HTML5's strong demand for semantics.

3 、

< li >

Define a list item in the list

The attributes are as follows:

Value:

This integer property indicates that this

< li >

Elements are listed in an ordered list by the

< ol >

The sequence number in the element definition. The value of this property can only be displayed with numbers, even if the list is displayed using Roman numerals or letters. Subsequent list entries are counted from the set value. The value property is used for unordered lists

< ul >

) or menu (

< menu >

) invalid.

Type:

The type of the specified number.

'a 'indicates a lowercase letter number

'A' indicates a capital letter number.

'i' indicates a lowercase Roman numeral number

'I 'means uppercase Roman numeral number

'1' represents a numeric number (the default).

Third item fourth item fifth item

Output:

III.third itemIV.fourth itemV.fifth item

< ul >

< li >

Define an unordered list first item second item third item

Output:

-first item-second item-third item

< ol >

< li >

Define an ordered list

First item second item third item

Output

-first item-second item-third item

4 、

< dl >

< dt >

< dd >

Generate a list of instructions

< dl >

Represents a collection of items.

< dt >

The title of the content.

< dd >

Specific content

Name Godzilla Born 1952 Birthplace Japan Color Green

Output:

Name GodzillaBorn 1952Birthplace JapanColor Green

5 、 figure 、 figcaption

Figure represents a separate piece of content, showing referenced pictures, illustrations, tables, code snippets, and so on.

Figcaption represents the illustration of the legend

Elephant at sunset

An elephant at sunset

6 、 main

There can be only one main element per page, and he represents the theme of the page.

Bicycle off-road

Bicycle off-road for three generations

economic loss

Climb a naturally occurring rock face in the wild.

Thank you for reading! This is the end of this article on "what are the common grouping elements of HTML5?". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!

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