Class 10 HTML Worksheet: The <font>
Tag (Deprecated)
Part A: Fill in the Blanks
- The
<font>
tag was used to change the __________, __________, and __________ of the text. - The
color
attribute of the<font>
tag changes the __________ of the text. - The
size
attribute can take values from __________ to __________ or use relative values like+1
,-2
, etc. - The __________ attribute is used to change the font family of the text inside the
<font>
tag. - In modern HTML, the
<font>
tag is replaced by __________ for text styling.
Part B: True or False
- The
<font>
tag is still recommended for styling text in modern HTML. (True / False) - The
size
attribute can be used with numeric values or relative size values. (True / False) - The
color
attribute of the<font>
tag accepts both color names and hexadecimal color codes. (True / False) - The
<font>
tag is a block-level element. (True / False) - You can specify multiple font families in the
face
attribute by separating them with commas. (True / False)
Part C: Short Answer Questions
- What was the purpose of the
<font>
tag in older versions of HTML? - Write the HTML code to display text in blue, using the Arial font and size 4.
- How can you specify multiple fonts in the
face
attribute of the<font>
tag? Provide an example. - Write the HTML code to display a paragraph in red color, with the size set to
+2
relative to the default font size. - Explain why the
<font>
tag is no longer used in modern web development. What should be used instead?
Part D: Practical Exercises
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.
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.
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.
- The first line of text is displayed in size
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>
0 Comments
Please do note create link post in comment section