I have written all my HTML code using the font tag. I used size="2" and size="3"
Is it possible to define a main CSS style in which I define the sizes for these fonts?
<font size="2">Hello 1</font>
<font size="3">Hello 2</font>
Thanks a lot guys
Of course you can. Try adding this to a css style included in your page:
font[size="2"] {
font-size: 20px;
}
font[size="3"] {
font-size: 30px;
}
Naturally you have to choose the size you prefer.
By the way, the <font> tag is obsolete, and you should not use it. Use <span> and assign it a class, instead.
Further reference: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/font
span class="size2"instead offont size="2"in the HTML. Then, use CSS.size2 { font-size: 10pt; }and similar for size 3. However, you need to use points for CSS. Generally, size 2 is 10pt and size 3 is 12pt. microsoft.com/typography/web/designer/face3.htmfontis long obsolete. Steer way clear of it; it's harder to write something the right way once than rewrite it.