View video tutorial

CSS Internal

CSS

An internal CSS applies styles to the current document.

Internal CSS


CSS styles can be applied to HTML documents in 3 ways:

Inline - Uses style attributes inside HTML elements.

Internal - Uses a <style> element in the <head> section.

External - Uses a <link> element to link to an external CSS file.

Internal Style

An internal CSS uses the <style> element to declare the CSS.

This CSS is reusable which means the style can be applied to multiple elements in the document.

Example

<style>
  body {
    background-color: #ccf4fe;
  }
  h1 {
    color: blue;
  }
  p {
    color: red;
  }
</style>
Try it Now »

Click on the "Try it Now" button to see how it works.