Inline Styles

//the example below shows how to change the color and the left margin 
//of a <h1> element

<h1 style="color:blue;margin-left:30px;">This is a heading</h1>
  • May be used to apply a unique style for a single element.
  • To use inline styles, add the style attribute to the relevant element.
  • The style attribute can contain any CSS property.
  • An inline style loses many of the advantages of a style sheet (by mixing content with presentation). Use this method sparingly.

Related concepts

Inline Styles — Structure map

Clickable & Draggable!

Inline Styles — Related pages: