Understanding the role of Div (division) in typesetting

Source: Internet
Author: User

In the process of Web page making, we can divide some independent logical parts into a <div> label, the function of the <div> tag is equivalent to a container.

Grammar:

<div>…</div>

Determine the logical part:

What is the logical part? It is a set of elements that are related to each other on a page. such as the independent section of the page, is a typical logical part. As shown: The section marked with a red border in the figure is a logical part, and the label can be used <div> as a container.

Example:

<!DOCTYPE HTML><HTML><Head><Metahttp-equiv= "Content-type"content= "text/html; charset=utf-8"><title>div tags</title></Head><Body>    <Div>        <H2>Top Course Rankings</H2>        <ol>            <Li>Front-end development interview Heart</Li>            <Li>0 Basic Learning HTML</Li>            <Li>JavaScript full guide</Li>        </ol>    </Div>    <Div>        <H2>Latest Course Rankings</H2>        <ol>            <Li>Version management tool Introduction-git</Li>            <Li>Canvas drawing Detailed</Li>            <Li>QQ5.0 Slide Menu</Li>        </ol>    </Div></Body></HTML>

Understanding the role of Div (division) in typesetting

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.