Question

<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?

Était-ce utile?

La 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.

Autres conseils

Relative resizing implies that the font will be resized relative to the default font size in the user's browser settings. However it is not a good programming practice to mix presentation and declaration code. Use CSS instead.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top