HTML Styles Lesson - 11

At this lesson we will talk about HTML Styles, What is Inline and Internal CSS and it's usage.

First of all let us define what is CSS.

CSS stands for Cascading Style Sheets. And it is makeing lots of work for our web page, coloring, background, font style, size and so on. All this is CSS's job.

There are 3 kind CSS usage, we will talks about 2 of them Inline and Internal CSS. About third one which is External we will talk in our CSS tutorials.

So what is Inline CSS.

Inline CSS is when we use CSS atributes inside our HTML tag, for this we need style attribute, parameter and value.


This is Inline CSS.

<h1 style="color:red;">This Heading is Red</h1>   

Attribute=style, Parameter=color, Value=red. Parameter and Value must be in the "patches", middle we need ':' symbol and at the and  ';' symbol.


This is Internal CSS

<!DOCTYPE html>




    body {background-color:red;}

    h1 {color:black;}

    p {color:yellow;}




      <h1>This Heading is Black</h1>

      <p>This Paragraph is Yellow</p>



As you can see Internal method is bit different from Inline method, if in the Inline only one <h1> have style here all <h1> and <p> have styles also we have background color for entire page.