Inline Styles

Inline Styles
Inline Styles in CSS3
Inline Styles declare an individual element’s format using the XHTML attribute style.

Tip: Inline styles do not truly separate presentation from content. To apply similar styles to multiple elements, use embedded style sheets or external style sheets, introduced later in this chapter.


Attribute style specifies an element’s style. In this line, we declare this particular p element to use 20-point font size.

<p style = "font-size: 20pt">
This text has the <em>font-size</em>style applied to it, making it 20pt.
</p>








This line specifies the two properties, font-size and color, separated by a semicolon. In this line, we set the given paragraph’s color to light blue, using the hexadecimal code #6666ff.

<p style = "font-size: 20pt; color: #6666ff">

No comments:

Post a Comment