This is green color text |
Chapter Summery:
- Use html size attribute <font size =” 1″ > to specify the font size.
- Use html style attribute <font face = “Arial”> to set specific font style.
- Use html font color attribute <font color = “green”> to set specific font color.
Interview Questions:
- How can you create multi color text on a html web page?
We can create multi color text on a web page using html attribute <font color = “color name”> ..</font>. Use this attribute as many times as you needed to make your web page multi colored.
- Explain font tag?
Font tag is used to specify the font color, size and shape of a text. However, in html 5 the font tag has been eliminated and now, one can change the font color or size using css.
Practical Exercise:
<!DOCTYPE html> <html> <head> <title> Example</title> </head> <body> This is pink color text. </body> </html> |
In above html code:
- Change text size to 7.
- Change font style to ‘Times new roman’.
- Set text color to pink.
Click here to practice above exercise in real time HTML code editor |
---|