Help:Font size

From QED

Jump to: navigation, search

Contents

Notes for Readers

Most browsers have a key combination that allows the font sizes used to display a page to be increased or decreased incrementally. Typically, these are "Control +" and "Control -" respectively.

Notes for Editors

For simplicity and stylistic consistency, it is usually better to avoid specifying font sizes explicitly. When you specify a heading level, for example, the font size will be adjusted automatically in a manner that fosters consistency.

When font sizes must be changed, it is usually better to specify a percentage change. For example, when mathematical expressions created using the <math> tag are interspersed with ordinary text, increasing the default font size by about 30% (font-size:130%) may improve readability. Further details about how to do this are presented in the section "font-size" below.

In most other cases, if the font size of a section of text must be modified explicitly, then it is preferable to use one of these HTML tags:

  • <big> (equivalent to CSS: {font-size:larger})
  • <small> (equivalent to CSS: {font-size:smaller})

"font-size"

You can get fine-grained control of font size using "font-size". For example:

{{font-size|125%|One hundred and twenty-five percent}}

produces:

One hundred and twenty-five percent


The font-size template uses an HTML <span> tag, so that the above is equivalent to:

<span style="font-size:125%">One hundred and twenty-five percent</span>

To change the font size of an entire page or segment including division breaks, use the <div> tag instead of <span>.

Template:fs

This template modifies the font size by using the HTML size parameter. Specifically:

{{fs|SIZE|TEXT}} is a shortcut for <font size={{{1}}}>{{{2}}}</font>.

For example:

{{fs|1|one}} produces one

{{fs|2|two}} produces two

{{fs|3|three}} produces three

{{fs|4|four}} produces four

See also

Personal tools