HTML examples

Each example can be viewed in the online code editor so that you can expirement with the code as much as you like.

Jump to:

Basics | Text | Text formatting | Links | Images | Imagemaps | Tables | Frames | Forms | Stylesheets | Meta tags | Document types | Base tag | Scripts

HTML basics

Setting a background color
Including comments in code
Setting the title of a document
A simple HTML document

^Back to top

HTML text

Displaying bold, italic, or underlined text
Displaying text in different sizes using headings
Displaying text in different fonts, sizes, and colors
Using various text tags at once

^Back to top

HTML text formatting

Abbreviations and acronyms
Displaying text as an address
Skipping lines in a webpage
Using computer-output tags
Definition lists
Deleting and inserting text
Creating horizontal lines
Creating an ordered list
Creating ordered lists
Creating an unordered list
Creating unordered lists
Creating nested lists
Displaying paragraphs
Displaying preformatted text
Displaying quotations
Setting text to a subscript or superscript
Setting text direction

^Back to top

HTML links

Linking to other websites
Linking to other directories
Linking within the same page
Opening links in a new window
Linking to resources other than webpages

^Back to top

HTML images

Displaying images from the same directory
Displaying images from another directory or website
Setting a background image
Setting an image to different sizes
Setting image border size
Setting an image as a link
Setting a title for an image
Aligning an image with a paragraph

^Back to top

HTML imagemaps

Associating an image with an imagemap
A completed imagemap

^Back to top

HTML tables

Basic HTML table
Table celpadding
Table cellspacing
Table cell background color
Table cell background image
Table with empty cells
Table row span and column span
Table background color
Table background image
Table borders size
Table caption
Table cell alignment
Table 'frame' attribute
Table headings
Table without borders
Tags in tables
Nested tables

^Back to top

HTML frames

Horizontal frames
Vertical frames
Mixed frames
Frame jumping
Navigational frames
Frames with no borders
Frames not supported
Frames not resizable

^Back to top

HTML forms

Form buttons
Form checkboxes
Form fieldset
Form hidden fields
Form images
Form password field
Form radio buttons
Form textarea
Form textbox
Submit a form
Reset a form

^Back to top

HTML stylesheets

External stylesheet
Internal stylesheet
Inline stylesheet

^Back to top

HTML meta tags

Specifying a page author
Specifying a page description
Specifying a page expiration
Specifying a page generator
Specifying keywords for a page
Preventing frames
Redirecting the user from one page to another

^Back to top

HTML document types

Transitional document
Frameset document
Strict document

^Back to top

HTML base

Setting a reference point
Opening links in a new window

^Back to top

HTML scripts

Placing a script on a webpage
Dealing with browsers that cannot execute scripts

^Back to top

© Copyright 2013-2014
Terms of use | Privacy policy | Copyright information