Page 168 - CA_165_V2.0_Flipbook
P. 168
}
H1
{
COLOR:RED;
MARGIN-LEFT:20PX;
}
H2
{
COLOR:GREEN;
MARGIN-LEFT:25PX;
}
Step 2: Use the preceding CSS file in your web page with the help of HREF attribute of the <LINK> tag.
<HTML>
<HEAD>
<LINK REL="stylesheet" TYPE="text/css" HREF="mystyle.css">
</HEAD>
<BODY>
<H1> Cascading Style Sheet</H1>
<H2> Linking External Stylesheet</H2>
</BODY>
</HTML>
Step 3: When you open your web page in web browser, you will get the following output:
Internal Style Sheet
CSS design can also be applied into an HTML document by using <STYLE> tag. This tag should be placed
inside the <HEAD>...</HEAD> tags. An internal style sheet is commonly used when one web page has a
unique style.
<HTML>
<HEAD>
Internal Style Sheet
166 Touchpad Computer Applications-X

