Using CSS

Internal Styles

Internal styles are found in the head of a HTML document. Everything between the <style > and </style> tags is internal css. In this case the style knows which element it refers to because the #Layer1 in the style, links to the id="Layer1" of the <div>.

The code below shows what it looks like:

<head>
<title>Document Title Here</title>
<style type="text/css">
<!--
#Layer1 {
position:absolute;
width:200px;
height:115px;
z-index:1;
}
-->
</style>

</head>
<body>
<div id="Layer1"></div>
</body>

Advantages of internal styles are

  • this is where HTML editors like Dreamweaver put styles made using the properties window, so they are easy to make and relatively easy to find

Disadvantages of internal styles are

  • Each web page contains it's own style so they can have quite large file sizes
  • You can't link to these styles from another page - you have to copy or remake them