TechShizz | CSS | Internal, inline and external CSS

CSS | Internal, inline and external CSS

Internal

Internal CSS is where the CSS code is embedded within the page that it is being used. We enter the CSS inside 'Style' tags just before the closing 'Head' tag.

<style type="text/css">

h1,h2 {
color:green;
font-family:Arial;
font-size:50px;
}

</style>

 

Inline

We can use inline styles to change the style of a single paragrah, heading, div or any element like this.

<p style="color: red; font-family: arial;"><This is some paragraph text </p>

 

Exrernal

The most common and effective way to use CSS is with an external style sheet. This single file will keeps the whole website consistant.

<link rel="stylesheet" type="text/css" href="style.css" />

 

Add comment