Tuesday, January 15, 2013

Three Ways to Use CSS

1. External Style Sheet

Ideally applying to entire web site or at least multiple pages. It has to be imported by Link tag in the head section.

<.head>.
<.link rel="stylesheet" type="text/css" href="mystyle.css">.
<./head>.

2. Internal Style Sheet

Defined in head.

<.head>.
<.style>.
hr {color:sienna;}
<./style>.
<./head>

3. Inline Style

Use the style attribute for relevant tag.

<.p style="color:red;margin-left:20px;">.paragraph.<./p>.

No comments: