Monday, September 13, 2010

SOME BASIC HTML TAGS AND HOW TO USE THEM

Chart 1: Common HTML 4.01 Markup For Text
NameOpening TagClosing Tag
1st Level Heading Title

2nd Level Heading Title

3rd Level Heading Title

4th Level Heading Title

5th Level Heading Title
6th Level Heading Title
Paragraph

Blockquote
Line Break
(none)
Non-breaking space (none)
Italic, Emphasis
Bold
Quote"(none)
Comment tags

(Spacing must be exactly like this for the comment element, with a space between the beginning and ending tags.)

(NOTE: These are comments that you want behind the scenes within the HTML, not to show up on the Web page, such as for instructions or details about the page. Use these judiciously, however.)

top‘On this page’ menu

Chart 2: Common HTML Markup
For Special Characters
NameCharacterHTML
Ampersand&&
Quote, Inches""
Curly Quote - Opening““
Curly Quote - Closing””
Copyright©©
TrademarkTMTM
Registered®®

top‘On this page’ menu

Chart 3: Common HTML Markup
For Unordered Lists
NameOpening TagClosing Tag
Unordered List
Unordered List item
  • Unordered List Example:

    • List item

    • Next list item

    • Another list item

    See the Unordered List example below for how it looks on a Web page.

    top‘On this page’ menu

    Chart 4: Common HTML Markup
    For Ordered Lists
    NameOpening TagClosing Tag
    Ordered List
    Ordered List item
  • Ordered List Example:

    1. Item One

    2. Item Two

    3. Item Three

    See the Ordered List example below for how it looks on a Web page.

    top‘On this page’ menu

    Chart 5: Common HTML Markup
    For Definition Lists
    NameOpening TagClosing Tag
    Definition List
    Definition Term
    Definition
    Definition List Example:

    Term

    Definition of term above


    Another Term

    Definition of another term above

    top‘On this page’ menu

    Examples: HTML Markup in Action

    Please note the placement and use of the opening and closing tags. Remember to add the closing tags, too.

    Using the markup designated for its purpose is important, too. See my tutorial on their appropriate use with examples at Semantics, HTML, XHTML, and Structure.

    Heading Examples

    Remember to use them in order, beginning with h1, and don't skip over any of them (such as from h1 toh3, skipping h2).

    You can use CSS to style them how you wish, including colors, fonts, font sizes, margins, padding, and more. For example, the colors, fonts, font sizes, etc. that you see below are all handled with WebsiteTips.com's CSS behind the scenes.

    Example 1.1: 1st Level Heading Title

    This markup:

    Heading Title

    creates this:

    Heading Title

    Example 1.2: 2nd Level Heading Title

    This markup:

    Heading Title

    creates this:

    Heading Title

    Example 1.3: 3rd Level Heading Title

    This markup:

    Heading Title

    creates this:

    Heading Title

    Example 1.4: 4th Level Heading Title

    This markup:

    Heading Title

    creates this:

    Heading Title

    Example 1.5: 5th Level Heading Title

    This markup:

    Heading Title

    creates this:

    Heading Title

    Example 1.6: 6th Level Heading Title

    This markup:

    Heading Title

    creates this:

    Heading Title

    top‘On this page’ menu

    Paragraph Examples

    Example 2.1: Two Paragraphs (showing the HTML)

    Here is a sample of text with HTML for a paragraph. Here is a sample of text with HTML for a paragraph. Here is a sample of text with HTML for a paragraph. Here is a sample of text with HTML for a paragraph.

    Here is the next paragraph. Here is the next paragraph. Here is the next paragraph. Here is the next paragraph.

    Example 2.2: The two paragraphs above as they would appear on a Web page:

    Here is a sample of text with HTML for a paragraph. Here is a sample of text with HTML for a paragraph. Here is a sample of text with HTML for a paragraph. Here is a sample of text with HTML for a paragraph.

    Here is the next paragraph. Here is the next paragraph. Here is the next paragraph. Here is the next paragraph.

    top‘On this page’ menu

    Blockquote and Curly Quotes Examples

    This markup:

    As John Doe stated recently,

    “Here is a sample of quoted text, usually a couple of sentences or more. Here is a sample of quoted text, usually a couple of sentences or more. Here is a sample of quoted text, usually a couple of sentences or more.”

    creates this:

    As John Doe stated recently,

    “Here is a sample of quoted text, usually a couple of sentences or more. Here is a sample of quoted text, usually a couple of sentences or more. Here is a sample of quoted text, usually a couple of sentences or more.”

    top‘On this page’ menu

    Example 3.1: Miscellaneous Examples

    Text with Emphasis

    This markup:

    Here is a sample of emphasized text. This sentence emphasizes these words but not the others.

    creates this:

    Here is a sample of emphasized text. This sentenceemphasizes these words but not the others.

    Bold Text

    This markup:

    Here is a sample of bold text. For this sentence, only these words are in bold text.

    creates this:

    Here is a sample of bold text. For this sentence, only these words are in bold text.

    top‘On this page’ menu

    Lists, Definition Lists

    Unordered List

    This markup:


    • List item

    • Next list item

    • Another list item

    creates this:

    • List item
    • Next list item
    • Another list item

    Ordered List

    This markup:


    1. Item One

    2. Item Two

    3. Item Three

    creates this:

    1. Item One
    2. Item Two
    3. Item Three

    Definition List

    This markup:


    Term

    Definition of term above


    Another Term

    Definition of another term above

    creates this:

    Term
    Definition of term above
    Another Term
    Definition of another term above

    No comments:

    Post a Comment