Help:HTML tags

From Illogicopedia
Jump to navigation Jump to search

This is a brief introduction to common HTML tags on wikis.

Text[edit source]

Increasing/decreasing text size[edit source]

There's a couple of ways to alter the size of text. The simplest is to use some basic HTML tags:

<big>Your text here</big>
<small>Your text here</small>

You can nest these to make text even larger (or smaller) aswell:

<big><big>Your text here</big></big>
<small><small><small>Your text here</small></small></small>

A second way to do it is this:

<p style="font-size:100%;line-height:110%">Your text here</p>

...where the percentage size of the text is adjustable; you can also specify size such as 10pt or 10px. You may also need to change the line spacing with line height percentage.

Reproducing code/fixed width font[edit source]

To format in this manner is simple.
Just leave a space at the beginning of the line.

Or you could use the <pre>Text goes here</pre> tags which achieves the same thing but with no wiki formatting. Beware, there is no word wrap for this. If you want that, change the font, instead.

Change text font[edit source]

Use <span style="font-family:'courier', monospace;">.Yer text</span>. Par example:

Yes I can hack the Internet! Suck it, society.

One thing to remember with this: use only very common fonts like Times, Verdana, Arial, Courier or Tahoma, else it might not appear on users' systems. Even those may not work, so specifying the generic family (serif, monospace, sans-serif) may be a better bet.

As an example, this sentence will only appear in the Impact typeface should you have that font installed on your computer.

Change text colour[edit source]

<span style="color:red">This text will be red</span>

The code produces:

This text will be red

Note the American spelling. You can also specify hex codes (eg. #FFFFFF for solid white) - the full range of colour names can be found at Illogicopedia:Palette. Non-colours such as 'whale' will only work on some browsers.

Underline and strikethrough[edit source]

Underline a batch of text:

<u>Your text here</u>: Your text here

Place a strikethrough:

<s>Your text here</s>: Your text here

Mathematical equations[edit source]

Use:

<math>insert forumla here</math>

See also[edit source]

Help from elsewhere[edit source]