Inline CSS Style

Style may be inline using the style attribute. The style attribute may be applied to any body element (including the body itself). The attribute takes as its value any number of CSS declarations, where each declaration is separated by a semicolon.

Example of inline style:

<p style="color:red; font-family:verdana, sans-serif"> This paragraph is styled in red with verdana font. If verdana is not available then the default font of sans-serif will be used.</p>

Inline style is far more inflexible than the other methods. This method should be used sparingly.

Inline style loses many of the advantages of style sheets by mixing content with presentation. Since there is no mechanism for specifying the intended medium for an inline style inline styles apply to all media.