CSS Style Types

How can I set a style in html?
what are the different types to set styles?


Types of styles:

Basically there are three ways we can set styles for the html tags.
  • Inline
  • Internal
  • External CSS

Inline Styles

This kind of style takes values inline with the html tag


<font style="color: red; background-color: orange;"> Test Font </font>


Test Font

Internal Styles

Here we define style under head tag and use it for our tags.
Inside head tag we will define styles as given in the examples.
Internal styles can be used in three ways,
  • universal
  • identifiers
  • user defined

Ask Questions

Ask Question