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. |