Html5 elements and basic syntax, basic syntax of Html5 Elements

Source: Internet
Author: User
Tags html comment

Html5 elements and basic syntax, basic syntax of Html5 Elements

HTML Tag
Opening tag: Open tag
Closed tag


Element
Definition: HTML elements refer to the code from the start tag to the end tag (elements start with the start tag and end with the default tag)
Element Content: The content of an element refers to the content between the start tag and the end tag.

Features:
1. Most HTML elements can be nested (including other HTML elements)
2. HTML documents are composed of Nested HTML elements.
3. Do not forget the end tag. The end tag cannot be omitted in future HTML versions.
4. Empty html elements
5. the html element without content is called the empty content of the element. The empty element is disabled in the start tag.
Note:
The difference between empty elements and empty content: the start and end labels of empty elements are the same, and the focus is on labels. Empty content indicates that the content in the element is empty and focuses on the content.

Basic HTML Structure
<! Doctype html>
<Head> <Meta> the tag is always in the head element. The TAG provides metadata about the HTML document.
<Style> tags are used to define style information for HTML documents.
<Title> </title> define the document title
The text between <body> </body> is the content of the webpage courseware.
<Html>

HTML attributes
Html tags can have attributes, which provide more information about html elements.
Attribute always appears in the form of name/value pair
Attribute values should always be included in brackets. Double quotation marks are the most common, but they are no problem with single quotation marks.

 

 

HTML comment
You can insert comments in the code to improve code readability. The comments are not displayed on the page and will be ignored by the browser.
Format: <! -- This is a comment -->

 

1 <! Doctype html> 2 

 

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.