In this lesson, let's learn what attributes are and how to change the background of a Web page.
First, web DIY
1. I want to change the background color of the page to black what should I do?
Try to change <body> into <body style= "Background-color: #000000;" > it.
Have you finished, uh ...
The background changed to black, because the text is also black, can't see the text. <body style= "Background-color: #000000;" > style defines <body>, which is the background color of the main body of the page is 16 #00000 (black).
2. By the way the color of the text also changed it.
<span> is used to control the label of small segment characters , <span style= "color: #ffffff;" The > style defines the color of the text within the <span> element as 16-#ffffff (white).
Two, the attribute in the HTML
Properties usually appear in this form (the red font is a property): <span style= "color: #ffffff;" "style" is the property of <span> . The style attribute is used to assign a performance property to a specific element , and the style will take effect regardless of any global style settings . Other attributes are:ID, class, title, Lang, abbr , etc.
36 or 16 in color
The hexadecimal color code begins with a # number, and three sets of 16 digits represent an RGB three-color, each set of numbers from 0 to FF. Do not know the hexadecimal students do not have to worry about finding the color they want, we use this dreamweaver in the input "<color:#" will jump out of the color selection box , choose the color you want, the software will Automatically fill in the hexadecimal code for you.
How to change the font and color?
is still implemented through the style attribute. In the style property, add:
"Font-famil: song body ; font-size:200%;"
Font-famil: To set the font, Font-size is to set the font size.
This tutorial describes how to modify the meaning of fonts and attributes in HTML, and try to modify your favorite fonts and colors to practice. The next lesson is how to structure the Web page of the tutorial, learning to complete you can be out of the HTML rookie, please look forward to!