How to use title elements, paragraphs, and forced line wrapping-basic tutorials

Source: Internet
Author: User
Tags html header
How to use the title element correctly
The HTML header element types are H1, H2, H3, H4, H5, and H6, numbers represent the structure level of the headings, and we want to take the title as seriously as we learn in school (hehe, but I haven't read many books, 69 sessions of junior high-translator).

The highest-level title must be H1 on the page. It should describe what this page is for. Most pages have a H1 title, but complex page files may have more than one H1 tag.

The H2 title will mark the next structure level, the second level is H3, and so on, and cannot jump from H2 to H4. H4 should not follow H2; Between them because it is H3.

Hn element types are important for tag headings, and assistive technology such as screen readers can use an appropriate title to understand the file's overview. If we use ..., then they can't read it.

How to use P and BR correctly
The P element marks a paragraph of the text. The paragraph includes one or more sentences.

Forced line Wrapping (BR) is usually just a surface tool that should be handled by CSS instead of HTML. However, forcing line breaks can be semantically useful in some places, such as poetry, songs, e-mail addresses, and computer-coded demonstrations, which may constitute legitimate uses, but separating paragraphs with BR is definitely not true.

On the other hand, P has a very clear semantic meaning: it represents a paragraph. Sometimes web designers use p as an ordinary block-level element, which is obviously incorrect. It's easy to see that in a form, the label and input tags are included in the P tag, which is absolutely wrong in semantics, and the label and input tags do not constitute a "paragraph".
  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.