I. Internal inline styles
<HTML>
<Head>
<Title> inline CSS style </title>
</Head>
<Body>
Inline CSS style: directly write the style in a tag (as the style attribute)
<Br/>
<H1 style = "color: orange; font-family: Impact"> stylesheets: the tool of the web design gods </Body>
</Html>
Ii. Internal embedded Style
<HTML>
<Head>
<Title> embedded CSS styles </title>
<Style type = "text/CSS">
H1 {color: green; font-family: Impact}
</Style>
</Head>
<Body>
Embedded CSS style: defines the style in the <H1> hello, CSS! </H1>
<H1> stylesheets: the tool of the web design gods
<H2> stylesheets: the tool of the web design gods </H2>
</Body>
</Html>
3. External link Style
<HTML>
<Head>
<Title> external link CSS style </title>
<LINK rel = "stylesheet" href = "mystyles.css" type = "text/CSS">
</Style>
</Head>
<Body>
<H1> hello, CSS! </H1>
<H1> stylesheets: the tool of the web design gods
<H2> stylesheets: the tool of the web design gods </H2>
</Body>
</Html>
-----------------------
Mystyles.css ------------------------------------------------------------------
H1 {color: green; font-family: Impact}
-----------------------
Mystyles.css ------------------------------------------------------------------
Iv. External import styles
<HTML>
<Head>
<Title> external import CSS styles </title>
<Style type = "text/CSS">
<! --
/* The imported CSS style actually exists in the internal style */
@ Import URL (CSS/mystyles.css );
@ Import URL (CSS/mystyles2.css );
H1 {color: orange; font-family: Impact}
-->
</Style>
</Head>
<Body>
<H1> hello, CSS! </H1>
<H1> stylesheets: the tool of the web design gods
<H2> stylesheets: the tool of the web design gods </H2>
</Body>
</Html>
Summary:
Internal style:
1. inline style (intra-row style)
2. Embedded Style
External style:
1. Link Style
2. Import a style