HTML5 div with span HTML block-level elements

Source: Internet
Author: User

HTML <div> and <span>

    • HTML List
    • HTML class

HTML elements can be combined by <div> and <span>.

HTML block elements

most HTML the element is defined as either a block-level element or an inline element.

Editor's note: " block-level elements " translated into Block level element , " Inline Elements " translated into Inline Element .

Block-level elements usually start (and end) with a new line when the browser is displayed.

Example:

HTML inline elements

Inline elements typically do not start with new lines when they are displayed.

Example: <b>, <td>, <a>,

HTML <div> Elements

HTML <div> element is a block-level element that can be used to combine other HTML the container for the element.

<div> the element does not have a specific meaning. In addition, because it belongs to a block-level element, the browser displays the folded line before and after it.

if the CSS used together, <div> elements can be used to set style properties on large chunks of content.

<div> Another common use of elements is the document layout. It replaces the old-fashioned way of using tables to define layouts. Using the <table> element for document layout is not the correct use of the table. The function of the <table> element is to display tabular data.

HTML <span> Elements

HTML <span> An element is an inline element that can be used as a container for text.

<span> The element also has no specific meaning.

when with CSS when used together, <span> element can be used to set style properties for partial text.

HTML Grouping Tags

label

description

<div>

define partitions or sections in the document (division/ section).

<span>

Defines span, which is used to combine inline elements in a document.

HTML5 div with span HTML block-level elements

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.