CSS your HTML partner ! !

CSS your HTML partner! !

Click here to visit Our forum here!

Saturday, January 29, 2011

Getting Started

Cascading style sheets is an excellent tool for adding layout effects for your Web site. It can save you a lot of time. A style sheet is made up of style rules that tells the browser how to render a document. There are many style rules to your HTML document, but the easiest way to start is to use HTML STYLE components. This element is placed in the document's HEAD part, including web STYLE rules.


Each rule consists of a selector — is typically an HTML element, such as BODY, p, or EM--, and the selector the style that accepts. There are many properties can be used to define an element. Each attribute with a value common to describe how selectors should be rendered.

Style rules are as follows:
Selector {property: value}
Single composite style selectors Declaration should be separated by semicolons:
Selector {property 1: value 1; property 2: value 2}
Following is a definition of the color and font size for H1 and H2 elements attributes:

<.HEAD.>
<.TITLE.>CSS example <./TITLE.>
<.STYLE TYPE="text/css".>
H1 { font-size: x-large; color: red }
H2 { font-size: large; color: blue }
<./STYLE.>
<./HEAD.>

*NOTE (Just ignore all full stop symbols)

The above style sheet tells the browser to increase title, red font to display level 1 title, using big, blue font to display secondary title. The CSS1 specification formally defines all valid attributes and values. Properties and values in the CSS properties section of this website are also given.

Internet References:
CSS 教程 - 介绍, [Online], Retrieved 28 Jan 2011.

CSS 层叠样式表 - CSS 速成, [Online], Retrieved 28 Jan 2011.

No comments:

Post a Comment