One, in-line in line
Inline styles are used directly in HTML tags using the Style property
Text
Set paragraph text red.
But keep in mind that the final HTML should be independent and use presentation documents, so the inline style should be avoided anywhere.
Second, Internal internal
The internal style of the implant used throughout the page is inside the head tag, and the style tag surrounds it.
"Http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" >
<title>CSS Example</title>
...
All paragraph text red, link blue.
Like the inline style, you should keep the HTML and CSS separate, so we're left with the savior.
Third, external
External styles are used throughout the Web site for multiple pages. It is a standalone CSS file, as in the following:
p {
color:red;
}
A
Color:blue;
}
If the above is saved as "Web.css", the HTML link is like this:
"Http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" >
<title>CSS Example</title>
...
The next tutorial will talk about other methods of outreach style, which are now sufficient.
From this guide, we will follow the above method to experiment with code is a good idea, with a text editor to create a new file, saved as "Web.css" in the HTML directory.
"Http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" >
<title>My First Web page</title>
...
Save the HTML file, now linked to the CSS, but now the CSS is empty, no content will not change the HTML. When you start learning CSS, you can add code to the CSS file to see the results of the HTML refresh.