About HTML font HTML font is the letters, signs, numbers used for writing text. HTML font is an important part in web page making. Using H...
About HTML font
HTML font is the letters, signs, numbers used for writing text. HTML font is an important part in web page making. Using HTML font information can be saved properly.
Some HTML font types are Times New Roman, Arial etc.
Font
Property
In making web page different types of fonts are used for a good design. All types of font together are called Font property.
Family
If we present different versions of a font then all the versions together are called Font family. Example: Arial font has some versions like Arial Black, Arial Narrow.
Style
Any font can be presented in Bold, Italic, and Underlined style etc. These are called Font style.
Size
Fond cab be made smaller or larger as users wish.
Tag
By using Font tag we can set the Font color, Font size, Font face of a web page.
As an example,
<font size="8" color = “blue” face = "arial">Blue text</font><br>
Here color attribute used for setting the color. By face attribute we set the font type. Font size is fixed by Size attribute.
Font tag starts with <font> and finishes with </font>. Into the opening font tag <font> we will write color, size, face whatever we want to add.
Color attribute
Color attribute is used for fixing the font color in html.
Some methods are used for setting the color of the font. By the name of the color we can set or RGB method is also used.
Font, color and size change example
<DOCTYPE html!>
<html>
<head>
<title>Different HTML tag styles</title>
</head>
<body>
<p>
<font size="8" color = “blue” face = "arial">Blue text</font><br>
<font size="5" color = “green” face = "times new roman">Green text </font>
</P>
</body>
</html>
From these we get output in Web browser like this,
Font sizes of HTML heading tags
Different size of headings are used in HTML pages. Heading tags are used from H1 to H6.
Heading tags | Results |
<h1>……</h1> | It will show the largest heading. |
<h2>……</h2> | Will show smaller than h1. |
<h3>……</h3> | Will show smaller than h2 |
<h4>……</h4> | Will show smaller than h3 |
<h5>……</h5> | Will show smaller than h4 |
<h6>……</h6> | It will show the smallest heading |
Font size of heading tag example
We have to type these codes into text editor and have to save the file with .html extension.
<DOCTYPE html!>
<html>
<head>
<title>Different HTML tag styles</title>
</head>
<body>
<h1>H1 heading tag</h1>
<h2>H2 heading tag</h2>
<h3>H3 heading tag</h3>
<h4>H4 heading tag</h4>
<h5>H5 heading tag</h5>
<h6>H6 heading tag</h6>
</body>
</html>



No comments