Highlights
All Snippets
Top 100 Snippets
Librarians
gbCodeLib

By Language
VB6
JavaScript
Perl
HTML
SQL
Java
DOS

GBIC >> Source Code >> HTML >> Snippet

05 Text Formatting


..Because, in the following example, there are NO HTML tags telling the
browser how to display the content, the following HTML would be read
by a browser as one long line, in the browsers default font:

< html >
< body >
hello
hello
hello
</ body >
</ html >

HTML supports several tag pairs which you can use to tell the browser how
to display text.  Simply place the text between one of the tag pairs to
have it displayed per the tag pair meaning:

< h1 >   </ h1 >   Large, bold header (actually there are 6 header tags, h1 thru h6)
< b >   </ b >    Bold
< i >   </ i >    Italic
< u >   </ u >    Underline
< p >   </ p >    Paragraph - browser places a blank line before a paragraph
< pre >   </ pre >   Display the text exactly as written, including recognition of spaces, in mono-spaced font
< code >   </ code >   Monspaced, sans serfic to resemble computer code
< sub >   </ sub >   Subscript
< sup >   </ sup >   Superscript

These tags can be embedded within one another, such as this bold-italic combination:

< b >< i > This will display as bold-italic </ i ></ b >