CBSE BOARD X, asked by anuragmishra2003, 11 months ago

FIT Chapter 5: HTML 1
how the font size of a single line on a web page be changed?

Answers

Answered by simran8040
15
f you plan on changing the font face and its color only once on a web page, you need to change its attributes within the element tag. Using the style attribute, you may specify the font face and color with font-family, color, and the font size with font-size, as shown in the example below.

Example:

<p style="font-family:Courier; color:Blue; font-size: 20px;">This text has the font Courier, is Blue, and 20px.</p>
result :

This text has the Courier font, is Blue, and 20px in size.

Answered by amankumaraman11
10
In the head portion of your web page, you may insert code between the <style></style> tabs to change the appearance of your text in various elements. The next blue box contains example code that, once called, would change your font face to Courier and color it red. As you can see, we have defined the class name as "custom." Once defined, this styling can be applied to most elements in your page by attaching the class "custom" to them. The following box shows two lines of code and their respective results.
Similar questions