In this tutorial, let me begin by talking about the 4 basic tags of HTML:
1.
2.
3.<body></body>
4.<title></title>
1.
The
2.
3.<body></body>
<body></body> is the main part of an HTML document that can contain <p>, </p>,
Property Purpose Instance
<body bgcolor= "#rrggbb" > Set background color. <body bgcolor= "Red" > Red background
<body text= "#rrggbb" > Set text color. <body text= "#0000ff" > Blue text
<body link= "#rrggbb" > Set the link color. <body link= "Blue" > links to Blue
<body vlink= "#rrggbb" > set the color of the links you have used. <body vlink= "#ff0000" >
<body alink= "#rrggbb" > set the color of the link being hit <body alink= "Yellow" >
Description: These properties can be used in combination, such as <body bgcolor= "Red" text= "#0000ff" >. The RRGGBB in quotation marks are RGB (that is, red, green, and blue three-color combinations) in six hexadecimal digits, such as the #ff0000 corresponding to red. In addition, you can use the constant name given in the HTML language to represent colors: black, white, Green, maroon, Olive, Navy, Purple, Gray, Yellow, Lime, Agua, Fuchsia, Silver, Red , Blue, and teal, such as <body text= "Blue" > indicates that the text in the <body></body> logo pair is displayed in blue in the browser's
box.
4.<title></title>
A person who has used a browser may notice the text information displayed in the top blue part of the browser window, which is generally the "subject" of the Web page, and it is very simple to display the theme of your Web page to the top of the browser, as long as the <title></title> Add the text you want to display between the label pairs. Note that the:<title></title> flag pair can only be placed between the
The following is a comprehensive example that you can read carefully to see how the above tags are used correctly in an HTML document.
Example 1 use of basic tags in HTML documents:
<title> text in top blue bar of browser </title>
<body bgcolor= "Red" text= "Blue" >
<p> red background, blue text </p>
</body>
Description: If you have never contacted HTML, do not know how to implement this example, you can do this:
1. Click "Start" → "program" → "Attachment" → "notepad"
2. Enter the blue HTML code above into Notepad, click the File menu in Notepad, and select Save.
3. In the "Save" dialog box that pops up, "save location" we choose D: disk, filename We enter abc.htm or abc.html (Note: Notepad default extension is. txt, this must be changed to. htm or. html), below the "Save Type" list box, select "All Files", Click the Save button.
4. Open the file we saved in the browser.