Create your first CSS web page using Internal Sheet

Create your first CSS web page using Internal Sheet

1.  Create a new web form called CSS Demo.aspx.

2.  After <title> tags press enter and write the code to add the style in your web page.

<title></title>
<style type=”text/css”>
</style>
</head>

3.  Next, between the opening and closing <style> tags, type the following CSS code:

<style type=”text/css”>
h1
{
font-size: 30px;
color: Orange;
}
p
{
color: red;
font-style: italic;
}
.RightAligned
{
text-align: right;
}
</style>
The first item is an h1 tag to style a heading, it font size is 30 pixels and is displayed in an Orange font color.

The second item is the letter p and defines the look and feel for all <p> elements in the page.

The last item is prefixed with a period (.) followed by the text RightAligned. This item is used to Right align some text in the page.
4.  Between the <div></div>tags, write the code which has been displayed on your web page.

<div>
<h1>Welcome to CSS Demo page</h1>
<p>CSS makes easy to style your pages. </p>
<p class=”LeftAligned”>
With very little code, you can quickly change the looks of a page.
</p>
</div>

5.  If you switch to Design View, you will see that the designer shows your text with the formatting defined in the <style> element of the page.