Types of CSS

There are three ways to include CSS in HTML.

  • Inline CSS

  • Embedded or internal CSS

  • External CSS

Inline CSS:

By using style attribute CSS with the HTML page.


        <h1 style="color:blue; font-size:50px;">This is a head section</h1>


Embedded or internal CSS:

Using style attribute inside the head section of HTML Page.



                    <title>My HTML Document</title>

                        <style type="text/css">

                                 body { background-color: Blue; }

                                  p { color: #fff; }



External CSS:

In this create new file style.css and link to HTML page by link.


        body {

                   background: blue;

                   font: 14px Arial, sans-serif;


        h1 {

                color: white;