HTML Attributes
Just like a box has different properties like height, width, length, area etc., most of the HTML elements also have some properties associated with them. These properties are called attributes. With the help of the attributes of HTML elements one is able to change the default property of an element. So, you should now understand that a typical HTML element might have several attributes associated with it. These HTML attributes are specified inside the HTML Start tag. A typical case of HTML attribute will be something like this
HTML Code
<StartTag attribute1 = “Value1” attribute2=’Value2’>
HTML Fonts
Many a times you would like to have a particular type of fonts displayed on your HTML page. To do this use the HTML Fonts tags. This element has several attributes some of which are mentioned below.
size - You can give this as a number, or a number with + or - size. The number with + or - size increases the font size by 1.
face - Specifies the font family of the texts like arial, or seriff etc.
color - You can either give the color name like red, pink etc or the hexadecimal value like (#ffffff for white)
HTML Code
<font size=3>Font size 3 </font> <br /> <font size=2>Font size 2</font>
Output
Font size 3
Font size 2
HTML Code
<font face="monospace">This font is monospaced.</font>
Output
This font is monospaced.
Code
<font color="red">Red.</font> <br/><font color="#DAD561">Color by value.</font>.
Output
Red.
Color by value.
Note:- The <font> tag has been deprecated. Use CSS for this.