bugl
bugl
HomeLearnPatternsPathsSearchPremium
HomeLearnPatternsPaths

Loading lesson path

Learn/CSS/CSS Foundations
CSS•CSS Foundations

How To Add Internal CSS

Internal CSS

An internal style sheet may be used if one single HTML page has a unique style.

The internal style is defined inside the <style> element, inside the head section.

Example

Formatted code
  <!DOCTYPE html>
<html>
<head>
<style>
body {

  background-color: linen;
}
h1 {
  color: maroon;

  margin-left: 40px;
}
</style>
</head>
<body>
<h1>This is a
  heading</h1>
<p>This is a paragraph.</p>
</body>
</html>

Live preview

Previous

How To Add CSS

Next

How To Add Inline CSS