CSS Introduction

In this page give you CSS introduction, What is CSS, How to write comment inside CSS, and What are the advantage of CSS.

What is CSS?

CSS stands for Cascading Style Sheet.
CSS is a plain text file to store properties.
CSS describing look and formatting properties for how content should be display on web-page.
CSS give you control to make global change and apply all web-page.

CSS use for how to display HTML elements look and formatting are set using CSS properties. Using CSS properties you can change every single elements style can change as you like. CSS Style sheet create and include with web-page is very easily. Using CSS Style Sheet update web-page formatting and maintain consistency across multiple web-pages.

CSS properties define either individually or group of element and best way to done while web-page is being created. Style Sheets like a 'blueprints' because its hold a group of style related properties and values.

Define CSS Comments

CSS comment you can define in to your <style> section or Style Sheet using /* and */ (following example line 2 and line 4 comment define).

CSS Comments Example

/* Header style start from here */    
#header {
   color:purple;        /* Default header color */
   margin-left:20px;
}
#header .logo {
   font-size:16px;
   background-color:#FF6633;
}

Advantage of CSS

Easy Manage: CSS with you can better manage whole web-page. CSS allow to manage entire site elements looks and formatting in single style sheet file.

Global Change: CSS Style Sheet changes apply to global change for all web-page. When Style Sheet appear with web-page it's know as Cascading Style Sheet.

Save time: When we create HTML document, we define separate set attributes value in each element. but it is limited use. But, CSS give a lot of flexibility to set properties and values either group of element or single element. So it's benefit to avoid same code write again and again.

Easy Maintain/Update: CSS style sheet maintain easier and anytime you can edit elements properties and values.

3 way to write CSS: You can write CSS styles 3 way in-line element line (scope is only that element), Internal style write in header section (scope is only that web-page), or External style sheets write in external .css extension files. External style sheets enable you to change the elements and layout style of all the pages in a Web site, just by editing one single file.

Page Load Faster: Web-page with stylesheets take a bit of second to load very fastly.