External and Internal Style Sheets

External Style Sheet

An external style sheet is ideal when the style is applied to many pages. With an external style sheet, you can change the look of an entire Web site by changing one file. Each page must link to the style sheet using the <link> tag. The tag goes inside the section.

<html>
<head>
<link rel="stylesheet" type="text/css" href="style2.css">
</head>
<body>
text
</body>
</html>

Internal Style Sheet

An internal style sheet should be used when a single document has a unique style. You define internal styles in the section with the <style> tag

<head>
<style type="text/css">
body {background-color: gray}
</style>
</head>
<body>
this background will be gray
</body>
</html>