Inline Style Sheets

Inline Style Sheet allows the designer to add styles to any individual tag. Each tag uses the attribute STYLE with style properties and values in quotes. Multiple rules are separated by semicolons. Use double quotes to start and end the rules.

Style Sheets can be applied to large blocks of text using the Div (Division ) tag and to emphasize several words use the SPAN tag.

Inline Style Format: <html element  style="CSS property : value">

Applying inline style rules to a header

<h2 style="font-size:16px; font-family:Times New Roman; color:#0000ff"> Header Text</h2>

Header text formatted using inline style rules.

Applying inline style rules to Paragraphs

<p style="text-intent:0.50in">Paragraph Text</p>

<p style="background-color:#ffff99">Text</p>

This paragraph text has a yellow background color applied and a larger font size. The font family size was inherited since it was not specified.

Learn to use Div and Span Elements to apply styles.

Web Design with XHTML Part I
Doris Cuffey, Instructor