w3reference home
CSS Tutorial


Bookmark and Share

CSS Tutorial

CSS stands for Cascading Style Sheets. A style sheet is made up of style rules that tell a browser how to display HTML elements. HTML documents can be displayed by using different output styles, by the use of CSS. Styles are normally saved in External Style Sheets.

Why External Style Sheets??
By making a change in a single External Style Sheet, you can change the layout of all the web pages.

A style can be mentioned in an HTML element, , or it can be mentioned inside an external CSS file. Multiple External CSS can also be referenced in a single HTML document. Suppose, there are more than one style mentioned for an HTML element. What happens is that all the styles "cascade" into a new "virtual" style sheet. The priority order is as follows:
1) Inline style (inside an HTML element)
2) Internal style sheet (inside the tag)
3) External style sheet
4) Browser default
This order is popularly known as cascading order.

Let's try to understand with the help of an example the use and importance of CSS.
Suppose, a document contains text in bold at many places like given below:

This is one text in bold.
Now, suppose you want all the text that is in bold to be underlined as well as have color blue. This would require editing the entire document like:
This is one text in bold.
Editing the text in the entire document would be quite cumbersome. A short-cut would be CSS. This would need editing at only one place.
Code Validator
Learn FTP
Color finder
Link Checker
Free web designs
Coming soon!
Interview Questions...
'w3reference : Learn by examples ... Advanced to beginner's tutorials ...'
Ajax: AJAX tutorial1 | Apache: Apache HTTP Server | Restarting Apache | CSS: CSS Border | CSS Syntax | CSS Selector | CSS Comment | CVS: CVS Release | CVS Login | CVS Logout | CVS Annotate | Databases: Rolap Tutorial | OLAP Tutorial | OLTP Tutorial | data warehousing | Expect: HTML: html | Linux: Dot (.) conf files | Linux Mount Point | Linux Filesystem | SSH Tutorial | Linux Commands: cal | cat | cfdisk | chroot | MySQL: MySQL Commands | PHP: PHP Basics | PHP Variables | PHP Output (echo/print) | PHP String Concat | PL/SQL: PL/SQL Data Types | PL/SQL Control Structures | PL/SQL File Extensions | PL/SQL DBMS_OUTPUT package | Python: My first Python program | Shell: Starting Bash | Bash Redirection | Bash Pipes | Bash Variables | SQL: SQL Transactions | SQL Constraints | SQL Drop | SQL Union & Union All | SVN: svn architecture | SVN Repository | SVN Import | SVN Checkout | Tech: soap | Web Designing: Web Hosting | HTML/XHTML/CSS code validator | Learn FTP | Search Engine Optimization Tips | www: XML: XML vs HTML | XML Syntax | XML Tags, Elements and Attributes | XML Namespaces |
Sitemap | Disclaim | Privacy Policy | Contact | ©2007-2009 w3reference.com All Rights Reserved.