htmlfontsfont-sizehtml4

Relative size with font tag in html: Relative to whom?


<FONT FACE="Comic Sans MS" SIZE=“2“ COLOR="Red">
     This is comical and red and small</FONT><BR>
<FONT FACE="Comic Sans" SIZE="+2" COLOR="Red">
    This is red and big. Is it comical?</FONT><BR>
<FONT FACE="Comic Sans" SIZE="-2" COLOR="Red">
    This is red and big. Is it different?</FONT><BR>

Do the +/- values refer to the first tag or the one preceding the last element?


Solution

  • It is relative to the size set by the BASEFONT element (or 3 if no BASEFONT element is used). From the HTML 4.01 spec:

    The BASEFONT element sets the base font size (using the size attribute). Font size changes achieved with FONT are relative to the base font size set by BASEFONT. If BASEFONT is not used, the default base font size is 3.

    However, both FONT and BASEFONT are deprecated and you should be using CSS instead.