Internal Style Sheet

An internal style sheet may be used if one single page has a unique style. Internal styles are defined within the <style> element, inside the head section of an HTML page:

HTML file: Displayed by browser:
<style>
body {
    background-color: linen;
}
h1 {
    color: maroon;
    margin-left: 40px;
}
</style>
<body>
<h1>This is a demo</h1>
<p>of an internal style sheet</p>
<body>

This is a demo

of an internal style sheet


Back buttonTable of ContentsNext button