Types of HTML
In CSS there are three ways to add CSS –
• Inline CSS
• Internal CSS
• External CSS
Inline CSS – Inline CCS is used to apply CSS on a single element.
To use inline CSS, add the style attribute in that element, that you want to style.
Example
<!DOCTYPE html> <html> <head> <title>Inline CSS</title> </head> <body> <h1 style="text-align:center;color:blue">Hello World!</h1> </body> </html>
Output:
Hello World!
Internal CSS
Internal CSS is used to style a single page .
We can implement internal CSS between
tags in style attribute.Example
<!DOCTYPE html> <html> <head> <style> body { text-align: center; font-family:Florence, cursive; } h1 { color:blue; } </style> </head> <body> <h1>Hello World</h1> <p>Welcome to TutsFinder.</p> </body> </html>
Output:

External CSS –
In external CSS we have include external style sheet with the help of <link> tag .
It is used to style the entire website. An external style sheet is a separate file with.css extension.
You have to provide the url of stylesheet in head section with in <link> tag.
For Example
<head> <link type=”text/css” href=”url” /> Or <link rel="stylesheet" href="url"> </head> <pre> /div> </div>
Example
style.css body { text-align: center; font-family:Florence, cursive; } h1 { color:blue; }
Output:
