Definition Of CSS
Introduction:CSS is used to style or give a beautiful look to any element of an HTML document. HTML creates a basic structure on a webpage but CSS completes that structure. Web design can never be completed by HTML alone without CSS.
Definition of CSS:The full form of CSS Cascading Style Sheets. CSS is used to style the text more beautifully than changing the front and color. CSS is most urgent and important, especially for creating layouts.
Types of CSS:There are three types of CSS.
1. Inline CSS.
2. Internal CSS.
3. External CSS.
These three types of CSS complement HTML.
Inline CSS:Inline CSS is written in HTML tags with style attributes.
CSS rule can be written with style attribute in HTML element. This is inline CSS. I have used inline CSS in several places in HTML tutorials before. Inline CSS should not be written unless very necessary. Basically external CSS should always be used. Since CSS is written inside the element, selector is not required for inline CSS.
There has been a basic discussion about CSS. Now we have to learn where and how to write CSS. CSS rule can be written in 3 ways
1. Inline CSS:
I have used many inline CSSs in HTML tutorials before. CSS can be written with a style attribute inside the start tag of the HTML element.
2. Internal CSS:
See detailed discussion in the following lines
3. External (External CSS):
Create a file with a new .css extension and write CSS there and attach it to the HTML file with a link tag.
Internal CSS:Very easy. Internal CSS is written using the style tag inside the <head> </head> in any HTML document. E.g.