HTML
formatting tags
- HTML uses tags like <b> and <i> for formatting output, like bold or italic text.
- These HTML tags are called formatting tags (look at the bottom of this page for a complete reference).
- Often <strong> renders as
<b>, and <em> renders as <i>.
However, there is a difference in the meaning of these tags:
<b> or <i> defines bold or italic text only.
<strong> or <em> means that you want the text to be rendered in a way that the user understands as "important". - Today, all major browsers render strong as bold and em as italics. However, if a browser one day wants to make a text highlighted with the strong feature, it might be cursive for example and not bold!
Description
1)Header - <h?>
</h?>
There are 6 levels of headings available, from h1 for the largest and most important heading, down to h6 for the smallest heading.
2)Bold - <b>
</b>
The text in between the tags will be bold, and stand out
against text around it, the same as in a word processor.
3)Italic - <i>
</i>
Also working the same way as a word
processor, italics displays the text at a slight angle.
4)Underline - <u>
</u>
Again, the same as underline in a word processor. Note that
html links are already underlined and don't need the extra tag.
5)Strike-out - <strike>
</strike>
Puts a line right through the centre of the text, crossing
it out. Often used to show that text is old and no longer relevant. Also works
by using <s> </s> instead.
6)Preformatted Text - <pre>
</pre>
Any text between the pre tags, including spaces, carriage returns and punctuation,
will appear in the browser as it would in a text editor (normally browsers
ignore multiple spaces)
7)Source Code - <code>
</code>
Similar to tt the text is displayed in a fixed-width font, and is
commonly used to show source code. I have used it on this site, along with
style sheets, to show all tags.
8)Typewriter Text - <tt>
</tt>
The text appears to have been typed by a typewriter, in a
fixed-width font. For example: This text is written
using the <tt></tt> tags.
9)Block Quote - <blockquote>
</blockquote>
Defines a long quotation, and the quote is displayed with an
extra wide margin on the left hand side of the block quote.
10)Small - <small>
</small>
Instead of having to set a font size, you can use the small tag to render text slightly smaller than the text around
it. Useful for displaying the 'fine-print'.
Change the colour of a few words or a section of text. The 6
question marks represent the hex color code, see this list of colours and codes
for some samples.
12)Font Size - <font
size="?"> </font>
Replace the ? with a number from 1 to 7 to change the size
of the font. One being the smallest and seven the largest.
13)Font Size Change - <font
size="+/-?"> </font>
For an immediate change of font size with respect to the
font size preceding it, this tag increase or decreases the size of the font by
the number you specify. Eg: <font
size="-1">Some Text</font>
14)Change Font Face - <font
face="?"> </font>
To show text in a particular font, use the font name such
"Helvetica" or "Arial" or "Courier".
Be aware
that using some fancy font from your computer means that the person viewing
that page must also have that font installed on their computer too, otherwise
it will look totally different to them.
15)Centre - <center>
</center>
A useful tag, as it says, it makes everything in between the
tags centred (in the middle of the page).
16)Emphasis - <em>
</em>
Used to emphasize text, which usually appears in italics,
but can vary according to your browser.
17)Strong Emphasis - <strong>
</strong>
Used to emphasize text more, which usually appears in bold,
but can vary according to your browser.
Example
<html>
<body>
<p>An example of
<b>Bold Text</b></p>
<p>An example of
<em>Emphasized Text</em></p>
<p>An example of
<strong>Strong Text</strong></p>
<p>An example of
<i>Italic Text</i></p>
<p>An example of
<sup>superscripted Text</sup></p>
<p>An example of
<sub>subscripted Text</sub></p>
<p>An example of
<del>struckthrough Text</del></p>
<p>An example of
<code>Computer Code Text</code></p>
</body>
</html>
Display
An example of Bold Text
An example of Emphasized Text
An example of Strong Text
An example of Italic Text
An example of superscripted Text
An example of subscripted Text
An example ofstruckthrough Text
An example of
An example of Emphasized Text
An example of Strong Text
An example of Italic Text
An example of superscripted Text
An example of subscripted Text
An example of
An example of
Computer Code Text


0 comments:
Post a Comment