To request editing rights on the Wiki, click here.

Help:Wiki University Wikitext--Changing Fonts

From FamilySearch Wiki
Jump to navigation Jump to search

Lessons


Intermediate


Advanced


Flexbox


Additional Helps

The font you see on this page and all other pages in the Wiki is the default font. You can change the font by using the attribute "font-family:font value". Word processors provide a variety of font values you can use. For example, you can use Times New Roman, Sans-serif, Ariel, Tahoma, Algerian, etc.

Changing fonts[edit | edit source]

Fonts-1.jpg
  • Using our paragraph tags, we add the following inline style and attribute code between the p and the > in the opening paragraph tag:

<p style="font-family:times new roman"></p>

The aforementioned code changes the font from the system default to times new roman[1] as shown below:

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec sit amet iaculis metus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Fusce elementum efficitur faucibus. Curabitur eleifend quis ligula ac ullamcorper. Curabitur eget suscipit turpis.


  • NOTE: The new times roman font appears smaller than the default font. Keep this in mind when you change fonts as you may need to change the font size which is described in the next section.

Enlarging fonts[edit | edit source]

Large font.png

Normal size of the default font is about 14 pixels. Let's say we want to enlarge the font to say 16 pixels. To make the font larger you insert the attribute font-size:16px in the paragraph tag coding:

<p style="font-size:16px">

Here is the paragraph with the enlarged font:

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec sit amet iaculis metus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Fusce elementum efficitur faucibus. Curabitur eleifend quis ligula ac ullamcorper. Curabitur eget suscipit turpis.

Other ways to enlarge fonts[edit | edit source]

In addition to using fixed amounts such as pixels, you can use another attribute: "EM" instead of Pixels.

  • One "em" is the default size of the font on a page.
  • If you want to double the size of a your font, you will use "2em" and it will be twice as big as the default text.

Try these out[edit | edit source]

Exercises
  • Enlarge the lorem ipsum paragraph to 20px.
  • Change the font to "New Times Roman".


Quick Quiz
  • You can add the "font-size" attribute before the = sign?
A. True
B. False
  • Quotation marks are only needed at the beginning of the inline style code.
A. True
B. False
  1. "Times new roman" font is a popular font used in books and magazines. You can, however, use any font you want. Check Google.com/fonts for other font styles. Most if not all can be used in FamilySearch Wiki.