Html Text Formatting

The Text Formatting elements give logical structure to phrases in your HTML document. This structure is normally presented to the user by changing the appearance of the text. You can change the default presentation for any element using Cascading Style Sheets. For example if you wanted all emphasized text to appear in red normal text you would use the following CSS rule:

body { font-style:normal; color:red; }

HTML has elements for two degrees of emphasis:

  • The em element for emphasized text, usually rendered in italics.
  • The strong element for strongly emphasized text, usually rendered in bold.

An example of emphasized text:

<!DOCTYPE HTML>
<head>
    <title>fatalweb tutorials</title>
</head>
<body>
It is essential not only to guess but actually <em>observe</em> the 
results.
Let us now focus on <strong>structural markup</strong>.
</body>
</html>

Preformatted text

Preformatted text is rendered using fixed-width font, and without condensing multiple spaces into one, which results in preserved spacing. Newlines are rendered as newlines, unlike outside preformatted text. HTML markup in the preformatted text is still interpreted by browsers though, meaning that "<em>a</em> " will still be rendered as "a". To create preformatted text, start it with <pre> and end it with </pre>. An example:

<pre>
,-----------------------,
| No. | Person          |
|-----------------------|
| 1.  | Bill Newton     |
| 2.  | Magaret Clapton |
'-----------------------'
</pre>
Submit an Idea
  Thank you for your valuable feedback.
Your E-mail (optional):
Select Option:
Description:
 
Feedback
Your Name / email address
Feedback as
Your feedback
close
Quickly sign in with:

Create a FATALWEB account here:

First name:

Last name:

E-mail address:

Join Fatalweb

Already have a fatalweb account? Log in here