HTML5 Code Tutorial

Inline Style Sheets

The inline style tag or attribute looks like this:

The tag is placed right in the code on the web page, thus inline.

Inline style sheets will override both linked and embedded settings.

Inline style sheets use the same construction method of selector and declaration explained in Style Sheets, without the curly brackets.

<selector style="declaration</selector>

<selector style="attribute: value">paragraph</selector>

<p style="font-style: oblique; font-weight: 700">paragraph</p>

Altering Single Words and Phrases Within Other Elements

The <span></span>span tag can be used with inline style tags to alter words or phrases within h1-h6 elements, paragraphs, list items, tec..

<p>The desired information is found on <span STYLE="font-style:oblique; color: #ff0000">Page 1</span> of the manual.</p>

Inline Examples

They can be used with just about any web page element:
<p STYLE="color: red"></p>
<h1 STYLE="font-size: 18px"></h1>
<div STYLE="background: #ffcccc"></div>
<blockquote STYLE="margin: 1% 5%"></blockquote>
<img src="imagename" STYLE="box-shadow: none">