Font color, size & face


HTML font tag:
html font tag is used to change the font face, font color and font size. html font tag is a paired tag.

font tag has three important attributes:
size: used to change the size of the font (min =1 and max =7).
color: used to change the color of the text.
face: used to change the font style or font face of the text.

Fonts can be broadly categorized as: Serif and Sans-Serif
Serif fonts: Serif fonts contain extra arms and base at the end of the line strokes.
Ex: Times New Roman
Sans serif fonts: without serif.
Ex: Arial
Use serif fonts for heading.
Use sans serif fonts for paragraphs.
Font family: Arial
Font face: Arial black, Arial narrow etc

Interview Questions:

1. Which of the following HTML code is valid code?
a. colour=’red”
b. color=”red’
c. color="red"
d. colour="red"
Answer: c

2. Which of the following attribute(s) we can use with font tag?
a. size
b. face
c. color
d. All of above
Answer: d