The existence of CSS is to separate the content of the Web page from the way content is displayed.
There are several ways to use CSS, and the most common is to use it by introducing an external CSS file.
Html
<!DOCTYPE HTML><HTML><HeadLang= "en"> <MetaCharSet= "UTF-8"> <title>Link external CSS Styles</title> <Linkhref= "00_css use example. css"rel= "stylesheet"type= "Text/css" /></Head><Body><Table> <TR> <TD>Crazy Java Handouts</TD> </TR> <TR> <TD>Lightweight Java EE Enterprise Development Combat</TD> </TR> <TR> <TD>Crazy Ajax Handouts</TD> </TR></Table></Body></HTML>
Css
/**/{ background-color: #003366; Width: 400px;} /* set the background color, font, and so on for a cell */ { background-color: #fff; font-family: "_gb2312 in italics"; font-size: 20pt; text-shadow: -8px 6px 2px #333;}
Other ways to use CSS style sheets
Import an external style sheet
<style type= "Text/css" >
@import "Outer.css";
@import url ("Mycss.css");
</style>
Using internal styles
<style type= "Text/css" >
Style definition
</style>
Using inline styles
Style= "
Style definition
"
CSS Summary
CSS learning is actually two pieces of content, 1 selector 2 style settings
All the rest is how to set the style, set the type of use
CSS usage examples