CSS (cascading style Sheets) cascading style Sheets
inline style
- Inline style-Use the Style property in HTML elements
The way to use inline styles is to use style attributes in related tags. Style properties can contain any CSS properties. The following example shows how to change the color and left margin of a paragraph
<p style= "color:blue;margin-left:20px;" >this is a blue paragraph and with 2 blank in the left.</p>
Font-family: Font
Color: Font Color
Font-size: Font size for example: font-size:16px
Margin-left: Left Indent
Text-align: Text alignment
Background-color: Background color
Practice:
<! DOCTYPE html>
<meta charset= "Utf-8" >
<title> I want to learn html</title>
<body style= "Background-color:yellow;" >
<H1 style= "Text-align:center;color:green" > Overall background for medium yellow
<p style= "Background-color:green;" > This is a green-background paragraph. </p>
<a href= "http://www.cnblogs.com/thomason/" > used a tag and href attribute, link to my blog </a>
<p style= "color:blue;margin-left:20px;" >this is a blue paragraph and with 2 blank in the left.</p>
</body>
External style sheet
To change the appearance of multiple pages throughout the site, use an external stylesheet, using the <link rel= "stylesheet" type= "Text/css" href= "... css" > tags, but these haven't been learned yet.
Learn HTML section three. Close to the point: HTML style-css cascading style sheets