17
FORMATTING HTML TEXT PROF. DAVID ROSSITER 1/17

05 Formatting HTML Text

Embed Size (px)

DESCRIPTION

05 Formatting HTML Text

Citation preview

Page 1: 05 Formatting HTML Text

FORMATTING HTML TEXTPROF. DAVID ROSSITER

1/17

Page 2: 05 Formatting HTML Text

AFTER THIS PRESENTATIONYou'll be able to apply many types of text formatting

2/17

Page 3: 05 Formatting HTML Text

ELEMENTS WE WILL LOOK ATItalic and Bold <i> <em> <b> <strong>

Underline <u>

Big and Small <big> <small>

Highlighted <mark>

Subscript & Superscript <sub> <sup>

Inserted & Deleted <ins> <del>

3/17

Page 4: 05 Formatting HTML Text

ITALIC TEXT<i> makes the text italic; <em> does the same thing. The difference is that <em> emphasises importance

<p>He said <i>I am just going outside and may be some time</i>.</p>

<p>If you don't have a vaccination <em>you may catch malaria and die</em>.</p>

4/17

Page 5: 05 Formatting HTML Text

He said I am just going outside and may be sometime.

If you don't have a vaccination you may catchmalaria and die.

5/17

Page 6: 05 Formatting HTML Text

BOLD TEXT<b> makes the text bold; <strong> does the same thing. The difference is that <strong> emphasises importance.

<p>She said <b>If you want something said, ask a man; if you want something done, ask a woman</b>.</p>

<p>If you can't repay your mortgage <strong>you may lose your home</strong>.</p>

6/17

Page 7: 05 Formatting HTML Text

She said If you want something said, ask aman; if you want something done, ask awoman.

If you can't repay your mortgage you may loseyour home.

7/17

Page 8: 05 Formatting HTML Text

UNDERLINETry not to use underline - confusing/multiple meanings

<p>The viewer <u>may be confused</u> if you use underline.</p>

<p>Her name is <u>Cheng</u> Sin Ying.</p>

8/17

Page 9: 05 Formatting HTML Text

The viewer may be confused if you useunderline.

Her name is Cheng Sin Ying.

9/17

Page 10: 05 Formatting HTML Text

BIG AND SMALL TEXT<big> and <small> do exactly what you expect.

However, <big> is not part of the latest HTML standard.<p>It's dangerous to use <big>big</big> because it isn't part of HTML 5!</p>

<p>I'm embarrassed to say it loudly so here it is: <small>I love you!</small></p>

10/17

Page 11: 05 Formatting HTML Text

It's dangerous to use big because it isn't part ofHTML 5!

I'm embarrassed to say it loudly so here it is: Ilove you!

11/17

Page 12: 05 Formatting HTML Text

HIGHLIGHTING TEXT<mark> highlights the text

<p>Send us your bank details and you may become a <mark>millionaire</mark>!</p>

12/17

Page 13: 05 Formatting HTML Text

Send us your bank details and you may becomea millionaire!

13/17

Page 14: 05 Formatting HTML Text

SUBSCRIPT AND SUPERSCRIPT<sub> and <sup> are used for offsetting

<p>If x<sub>1</sub>=2 and x<sub>2</sub>=4 thenx<sub>1</sub><sup>2</sup> + x<sub>2</sub><sup>3</sup> equals 68</p>

<p>Some video streaming may use XML<sup>1</sup></p>

<p><sup>1</sup> G. Lam & D. Rossiter, 'A Web Service Framework Supporting Multimedia Streaming', IEEE Transactions on Services Computing, 2013</p>

14/17

Page 15: 05 Formatting HTML Text

If x1=2 and x2=4 then x12 + x23 equals 68

Some video streaming may use XML1

1 G. Lam & D. Rossiter, 'A Web ServiceFramework Supporting Multimedia Streaming',IEEE Transactions on Services Computing,2013

15/17

Page 16: 05 Formatting HTML Text

INSERTED AND DELETED TEXT<ins> and <del> are used for showing edits

<p>Let's do this edit: Prof. Rossiter is <ins>truly</ins> the most intelligent.</p> <p>Also this: Prof. Rossiter has an <del>astonishingly</del> old car.</p>

16/17

Page 17: 05 Formatting HTML Text

Let's do this edit: Prof. Rossiter is truly the mostintelligent.

Also this: Prof. Rossiter has an astonishingly oldcar.

17/17