Basic (X)HTML Formatting. There are number of formatting elements:- Font Size Colour etc

Preview:

Citation preview

Basic (X)HTML Formatting

Basic (X)HTML Formatting

There are number of formatting elements:- Font Size Colour etc

Making Text Bold or Italic

<b> This is BOLD </b> <i> This is ITALIC </i> Logical formatting

<em> emphasize italic </em> <strong> strong is in BOLD </strong>

Changing the Size of Text

To make the text bigger or smaller

<big>Attention</big> to all DSN S4 students

<small><small> tiny text </small></small>

Using a Monospaced Font

<body><p>Internet Programming</p>

<tt> Monospaced Font </tt> <br />

<code> Monospaced Font </code> <br />

<kbd> Monospaced Font </kbd> <br />

<samp> Monospaced Font </samp> <br />

</body>

Using Preformatted Text

Browsers eliminate all extra returns and spaces and automatically create line breaks according to the size of the window

Let you maintain the original line breaks and spacing that you’ve inserted in the text

<body><p>C++ Programming</p>

<pre>

for (i = 0; i<10; i++)cout<<“Internet Programming”;

</pre>

</body>

Creating Superscript and Subscript

<sup> … </sup> <sub> … </sub>

Superscript<sup>1</sup>

Subscript : H<sub>2</sub>O

Marking Changed Text

Lawyer and writers do this all the time Newly inserted text

<ins> … </ins> To mark deleted text

<del> … </del>

<p>I promise to do all of my homework,<ins>all of my chores,</ins>clean the cat litter, and not watch more than<del>six</del> a half hour<del>s</del> of tv.</p>

Explaining Abbreviations

<abbr> and <acronym> <p>

<abbr title=“Kuala_Lumpur_City_Center”>KLCC</abbr><br /><abbr title=“Kuala_Lumpur”>KL</abbr>

</p>

<p>

<acronym title=“Kuala_Lumpur_City_Center”>KLCC</acronym> is at the heart of <acronym title=“Kuala_Lumpur”>KL</acronym>

</p>

Recommended