Introduction of CSS | Cascading Style Sheet | Use of CSS with HTML

Introduction of CSS

introduction-of-css

The full name of CSS is cascading style sheet. CSS is used to decoration of a web page. CSS is created by world wide web consortium (W3C). Currently we are using CSS3.CSS defines that how to display HTML elements and set position of HTML elements. CSS is not a programming language.

Here some points are given below about CSS:

  • The full name of CSS is Cascading Style Sheet.
  • CSS defines that how to display HTML elements in a web page.
  • CSS is used for decoration and set position of a HTML element.
  • CSS is created by World Wide Consortium (W3C).
  • Currently we are using CSS 3.

How can we write CSS?

We can write CSS in a separate file and link it to our HTML file or embedded CSS in HTML file itself.

CSS has three category which can be used to write CSS.

  1. External Style Sheet
  2. Internal Style Sheet
  3. Inline Style Sheet

types-of-css

  1. External Style Sheet

External Style Sheet is a type of CSS. If we have more than one HTML files who wants same CSS to design a web page then we should use external style sheet. It has a single CSS code which is written in a separate file. This separate CSS file is link with all HTML files who want to use that CSS. In external style sheet CSS code is save with .css extension. CSS code is link in a HTML file by link tag.

external-style-sheet

  1. Internal Style Sheet

Internal Style Sheet is also a type of CSS. It is used for a single HTML document. Internal CSS is use with HTML file. Internal CSS is use by style tag.

  1. Inline Style Sheet

Inline Style Sheet is also a type of CSS. It is used for a single tag or a single element. We write CSS code for a separate tag.

Priority:-

  1. Inline Style Sheet => 2. Internal Style Sheet => 3. External Style Sheet

4 thoughts on “Introduction of CSS | Cascading Style Sheet | Use of CSS with HTML

Leave a Reply

Your email address will not be published. Required fields are marked *