Internal CSS

Internal styles are added in the HTML document themselves, in the head section.

That means they must be available on every page on which you want to use the styles.

The main benefit of this approach is if you have a simple page, without much styling, you can add a couple of styles in the head and be done with it.

The main drawback is that these styles will need to be repeated in the head section of every page on your website, so you will need to either repeat it on every web page meaning if there is a change you’ll have to manually make it on every web page.

The alternative is PHP, which would call a header.php file into every one of web pages, however this veers off into a completely different concept and programming language.

To use internal styling, you need to place your styles in the HTML Style tag:

Code:


<!DOCTYPE html>

<html>

<head

<style type="text/css">
p {color: blue}
h1 {font-weight: bold}
</style>

</head

<body>

Content of the page goes here.

</body>

</html>