|
|
|
|
|
Published on:
05-May-08
|
|
|
CSS
CSS in brief, Cascading Style Sheet, is the mechanism of making style of web pages( Web Documents, Web Pages), style of web pages is Fonts, Border, Color, Spacing etc…). CSS is a StyleSheet Language, which is represented in web pages, written in markup language. Also Style is used in most common applications, which is used HTML or XML. Let’s go in deep, first of we are going to Syntax of CSS,
CSS Syntax:
It’s easy to use, before uses of style sheet, how to make Style in particular matter, when you make style sheet, you have specify the name of style sheet, there is no any specification to give name, whatever name you choose for name of various property, style sheet consist list of rules, each rules row or rules set consist one or more selectors and declaration block, each declaration block comes in under the curly braces, and each declaration block has separate semecolor, each declaration itself consist of property, then : (Colon) then ; (Semicolon) use. It made up in three parts like,selector { property:value}, for example, table{width:50px; height:50px}. Now we go futher, now we see how to insert the style in web documents.
Inserting Style Sheet In Web Document:-
When browser reads style sheet, then it will implement according to the Style, that means when web documents read style sheet setting(property of tag which is in style sheet) then it will be formatted, there are three ways to insert style sheet. 1. External Style Sheet 2.Internal Style Sheet 3. Inline Style Sheet, in External Style Sheet, when style applied in many different Web Pages, entire pages are changes when we change in one style sheet file, and each pages must link to the style sheet using link tag in header section of html for example:
"
"
The browser reads the source of css file in xyz.css and format the entire text according to the style sheet file now letus look further in internal style sheet, it should be used in single documents has a unique style, you can define the internal style sheet using the style tag in head section.
"
"
The browser read the definition and implement according to the style sheet, now we go in inline Css inline style loses many advantages of style sheets by mixing content with presentation. Use this method sparingly, such as when a style is to be applied to a single occurrence of an element, for example "" This is a paragraph " more read…
|
|