Friday, March 25, 2011

kas-CASCADING Style Sheet (CSS)

CSS or CASCADING STYLE SHEET is used to style multiple web pages in one time. It is helpful because you don't have to repeat the tags in HTML, it just saves time and energy because once you apply a CSS, it is applicable to all web pages that you made.

An id and clas selector in CSS let you define a specific style for your chosen HTML tag. It goes like this:

#para1
{
text-align:center;
color:red;
}

The id selector  uses the id attribute of the HTML element, # and the id of the element is the word "para1" which distinguishes it from other elements in the HTML.

Another thing that's essential in CSS is the class selector.

According to www.w3school.com,
"The class selector is used to specify a style for a group of elements. Unlike the id selector, the class selector is most often used on several elements.
This allows you to set a particular style for any HTML elements with the same class.
The class selector uses the HTML class attribute, and is defined with a "."
In the example below, all HTML elements with class="center" will be center-aligned:

.center {text-align:center;} 

You can learn more from CSS if you'll log in to the said website becasue they offer tutorials. For now, i need more practice to make a perfect design for the web page. I admit that i learned a little bit from our discussion. Hehehe. Thank you for reading my blogs. I really appreciate it. ::))

No comments:

Post a Comment