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 label categories of HTML?

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

Share

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

This article mainly introduces the HTML tag classification, the article is very detailed, has a certain reference value, interested friends must read it!

HTML

1. Classification of labels

The tag represents an element

By nature: Block-Level and Inline-Level

Divided by semantics:

Headings: h2, h3, h4, h5, h6, h7

Paragraphs: p

Tables: table, thead, tbody, tr, th, td

Text Formatting: em, strong, sub, del, ins, small

Lists: ul, li, ol, dl, dt, dd

Forms and Input: form, input, select, textarea

HTML5: header, footer, article, section

Others: div, span, a, img

XHTML

XHTML became the W3C standard on January 26th, 2000. The W3C defines XHTML as the latest version of HTML. XHTML will gradually replace HTML. XHTML is formed by combining the strengths of HTML and XML. The XHTML syntax rules are as follows:

Attribute and label names must be lowercase

Attribute values must be in quotation marks

XHTML elements must be properly nested

Property cannot be abbreviated

Replace the name attribute with the Id attribute

The XHTML element must be closed

3. The semantics of tags

Marking documents for semantic expression rather than styling, well-structured documents can convey as much semantics as possible to browsers, whether they are on PDAs or stylish desktop graphical browsers. Well-structured documents can convey visual semantics to users, even in old browsers or in modern browsers that have CSS closed by the user. At the same time, well-structured HTML code also helps search engines index your site.

Do not use table layouts, table is used for tabular display.

Don't abuse div tags everywhere. Div is used for chunking.

Try not to use inline CSS

Do not use style tags such as font, center, big, small, b, I, styles can be controlled by CSS, b and I can be replaced by strong and em.

Instead of using newline labels and spaces to control styles, use CSS.

The above is all the content of the article "what are the tag categories of HTML". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow 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