Class 10 HTML Worksheet: The font Tag (Deprecated)

 Class 10 HTML Worksheet: The <font> Tag (Deprecated)



Part A: Fill in the Blanks

  1. The <font> tag was used to change the __________, __________, and __________ of the text.
  2. The color attribute of the <font> tag changes the __________ of the text.
  3. The size attribute can take values from __________ to __________ or use relative values like +1, -2, etc.
  4. The __________ attribute is used to change the font family of the text inside the <font> tag.
  5. In modern HTML, the <font> tag is replaced by __________ for text styling.

Part B: True or False

  1. The <font> tag is still recommended for styling text in modern HTML. (True / False)
  2. The size attribute can be used with numeric values or relative size values. (True / False)
  3. The color attribute of the <font> tag accepts both color names and hexadecimal color codes. (True / False)
  4. The <font> tag is a block-level element. (True / False)
  5. You can specify multiple font families in the face attribute by separating them with commas. (True / False)

Part C: Short Answer Questions

  1. What was the purpose of the <font> tag in older versions of HTML?
  2. Write the HTML code to display text in blue, using the Arial font and size 4.
  3. How can you specify multiple fonts in the face attribute of the <font> tag? Provide an example.
  4. Write the HTML code to display a paragraph in red color, with the size set to +2 relative to the default font size.
  5. Explain why the <font> tag is no longer used in modern web development. What should be used instead?

Part D: Practical Exercises

  1. Create an HTML document using the <font> tag (for educational purposes) with the following:

    • A heading in green color, size 6, and using the Times New Roman font.
    • A paragraph in blue, size 3, and using the Verdana font.
  2. Write the HTML code using the <font> tag to style the following text:

    • "Welcome to HTML" in red color, size 5.
    • "Learning is Fun" in black color, size 4, and using the Arial font.
  3. Write an HTML document where:

    • The first line of text is displayed in size +3, with red color and the "Courier" font.
    • The second line is displayed in size -2, with green color and the "Verdana" font.

Part E: Code Correction

Examine the following HTML code and correct any mistakes related to the <font> tag. Rewrite the correct code.


<!DOCTYPE html> <html> <head> <title>Font Example</title> </head> <body> <font size=3" color="blue" face="Arial">This is a heading</font> <font color="#FF0000" size="4>Welcome to my website</font> </body> </html>

EXTRA INFORMATION  AND Important Note:

The <font> tag is deprecated in HTML5, meaning it is no longer recommended for use in modern web development. Instead, text styling should be done using CSS. For example:


<p style="color: red; font-size: 20px; font-family: Arial;">
This is a styled paragraph using CSS.</p>

Post a Comment

0 Comments