CSS (Cascade Style Sheets)

CSS is used commonly by web designers to tell the web browsers to display their web pages in interesting ways by applying CSS rules to specific HTML tags. To learn HTML tags you can visit our HTML tutorial.

CSS has three types of rules:

    1. HTML selector: This rule is applied to the HTML tags to tell them how to display the content in the tags. For example, p is the selector of <p> tag.

Example:

p{color: green;}


    2. ID selector: This rule is usually applied once on the page to a particular HTML tag to create a unique object that can work with JavaScript code.

Example:

#menu{

margin:0;

padding:0

}


          3. Class selector: This rule can be applied to any HTML tags.

Example:

.myclass{

            font-size:20pt;

}




HTML Comment Box is loading comments...



This website intents to provide free and high quality tutorials, examples, exercises and solutions, questions and answers of programming and scripting languages:
C, C++, C#, Java, VB.NET, Python, VBA,PHP & Mysql, SQL, JSP, ASP.NET,HTML, CSS, JQuery, JavaScript and other applications such as MS Excel, MS Access, and MS Word. However, we don't guarantee all things of the web are accurate. If you find any error, please report it then we will take actions to correct it as soon as possible.