"HTML block" November 16, 2015 Learn HTML notes

Source: Internet
Author: User
Tags html notes

1. You can combine HTML elements with <div> and <span>.

2.HTML block Element

Most HTML elements are defined as block-level elements or inline elements.

Editor's note: "Block-level elements" are translated as block levels element, "inline elements" translated into the inline element.

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

Example:

3.HTML inline elements

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

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

4.HTML (DIV) Element

HTML <div> elements are block-level elements that are containers that you can use to combine other HTML elements.

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

If used with CSS, the,<div> element can be used to set style properties on large chunks of content.

Another common use of the <div> element 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.

5.HTML (span) element

HTML <span> elements are inline elements that can be used as containers for text.

The <span> element also has no specific meaning.

When used with CSS, the,<span> element can be used to set style properties for some text.

"HTML block" November 16, 2015 Learn HTML notes

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.