HTML Beginner Tutorials-tags, attributes, and elements

Source: Internet
Author: User
Tags end html tags
Beginners | tutorials

HTML is a simple text markup language, but she is different from some other text files, such as doc,wps, we should learn more about the relevant content to make it a valid HTML file.

Label

The basic structure of an HTML file consists of tags, labeled with tags, and labeled to indicate the meaning of the text.

Use WordPad to open our HTML file and change it as shown in code:

Save our files again, open the browser and press F5 to refresh our page. You can see that the contents of the page have not changed at all, but the purpose of HTML is to apply meaning rather than appearance, and this example already defines some basic elements of a Web page.

Now let's explain the code above: the first line of code <! DOCTYPE ... is to tell the browser what we are doing now. Sometimes some people may feel that this code can be omitted, but if we omit it may cause the browser to work abnormally, resulting in our production of the page can not be accessed. Now that some people are promoting XHTML, we'll focus on the file types in XHTML later. We usually make Web pages by adding the above code to the first line of your page.

Close Label:

</body> and

Not all tags have an end tag similar to this (

Property

Tags also have attributes, which is an extra bit of information. Attributes appear within that open tag, and their values are always within quotation marks. They are formatted for < tag properties = "Value" > web page </tags >. In the following article we will specifically describe the properties of the tag.

Elements

A label is the beginning and end of an element. The content of a Web page is made up of elements. Both the <body> and </body> tags are elements and <body> is the subject element. For example,<title> and </title> are tags,<title> web page welcome you </title> is a name element, he indicates that the content displayed in the browser's title bar is also the title of your page.



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.