HTML Learning Document-3, HTML elements

Source: Internet
Author: User

HTML documents are defined by HTML elements. The HTML element refers to all the code from the start tag (start tag) to the end tag (end tag).

Start tag Element content End tag
<p> This is a paragraph </p>
<a href= "default.htm" > This is a link </a>
<br/>
3.1 HTML element syntax

①html element starting with start tag

②html element terminated with end tag

The content of the ③ element is the content between the start tag and the end tag

④ some HTML elements have empty content

⑤ empty elements are closed in the start tag (ends with the end of the start tag)

⑥ most HTML elements can have properties

3.2 Nested HTML elements

① Most HTML elements can be nested (other HTML elements can be included).

②html documents are composed of nested HTML elements.

Instance:

The above example contains three HTML elements. <p> element;<body> element;

3.3 Note

① future HTML versions do not allow the end tag to be omitted.

② HTML elements that have no content are called empty elements. The empty element is closed in the Start tab. <br/> is the empty element, the self-closing and the label.

③ all elements must be closed.

④html tip: Use lowercase tags

HTML Learning Document-3, HTML 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.