HTML Fonts

The CSS font-family property defines the font to be used for an HTML element:
Example
<!DOCTYPE html>
<html>
<body>
<h1 style="font-family:verdana;">This is a heading</h1>
<p style="font-family:courier;">This is a paragraph.</p>
</body>
</html>

Text Size
The CSS font-size property defines the text size for an HTML element:
Example
<!DOCTYPE html>
<html>
<body>
<h1 style="font-size:500%;">This is a heading</h1>
<p style="font-size:100%;">This is a paragraph.</p>
</body>
</html>

Text Alignment
The CSS text-align property defines the horizontal text alignment for an HTML element:
Example
<!DOCTYPE html>
<html>
<body>
<h1 style="text-align:center;"> Heading</h1>
<p style="text-align:center;">paragraph.</p>
</body>
</html>

No comments:
Post a Comment