TutorialStudyMite

Ways to Insert CSS

AAayushi Bansal1 min read
Beginner friendly

Track completion, mastery, and revision.

There are three ways to insert CSS:

  • Inline style
  • Internal style sheet
  • External style sheet

Inline styles:

It is used to apply a unique style to a single HTML element. To use it, we should add the style attribute to the desired element and this style attribute can have any number of property-value pairs. For example,

<p style="color: red; margin-left:40px;">This is a paragraph</p>

Internal style sheet:

Internal style sheet is used when one single page has a unique style. It is added in the head section of an HTML page and internal styles are defined within the

Finished reading?

Was this helpful?

Your feedback shapes better tutorials for everyone.