Learn CSS in simple steps

CSS works in competition with the HTML. HTML represents as the building structure of the document while CSS represents look and feel of the document. 

Learning the Basics

C.S.S. stands for Cascading Style Sheets. This document contains styling rules which are used to apply for the HTML code. 

Three Types of CSS

1. External - In a separate file

2. Internal - At the top of a web page document

3. Inline - within the HTML tag

External

External Style Sheet is the seperate file containing the css code which applies to the HTML document. Take a new document file and save the file with .css extension. If you want to use your style sheet to various pages, then its always recommended to define a common style sheet in a separate file which is called external style sheet and then include that file in your HTML document using "link" tag.

style

externalstyle

Internal

Internal styles are placed within the HTML document in the Header section. If you want to apply Style Sheet rules ie., css rules only to a single document, then you can include those rules within the "style" tag in header section of the HTML document. This can be consider as a second priority styling and this can help you to "override" an external style sheet.

internal

Inline

Inline styles are used directly to the HTML element using "style" attribute of the relevant tag. This can be taken as a third priority because if you are interested to make a particular change in any HTML element then only consider this type of method. Inline style rules override the rules of internal as well as external sytling.

inline