From http://www.w3schools.com (Copyright Refsnes Data)

HTML Examples

Previous Next

HTML Basic Tags Examples

A very simple HTML document
How text inside paragraphs is displayed
More paragraphs
The use of line breaks
Poem problems (some problems with HTML formatting)
Heading tags
Center aligned heading
Insert a horizontal rule
Comments in the HTML source
Add a background color

Examples explained


HTML Formatting Text Examples

Text formatting
Preformatted text (how to control line breaks and spaces)
Different computer-output tags
Insert an address
Abbreviations and acronyms
Text direction
Long and short quotations
How to mark deleted and inserted text

Examples explained


HTML Link Examples

How to create hyperlinks
Set an image as a link
Open a link in a new browser window
Jump to another part of a document (on the same page)
Break out of a frame
How to link to a mail message (will only work if you have mail installed)
A more complicated mailto link

Examples explained


HTML Frame Examples

How to create a vertical frameset with 3 different documents
How to create a horizontal frameset with 3 different documents
How to use the <noframes> tag
How to mix a frameset in rows and columns
Frameset with noresize="noresize"
How to create a navigation frame
Inline frame (a frame inside an HTML page)
Jump to a specified section within a frame
Jump to a specified section with frame navigation

Examples explained


HTML Table Examples

Simple tables
Different table borders
Table with no borders
Headings in a table
Empty cells
Table with a caption
Table cells that span more than one row/column
Tags inside a table
Cell padding (control the white space between cell content and the borders
Cell spacing (control the distance between cells)
Add a background color or a background image to a table
Add a background color or a background image to a table cell
Align the content in a table cell
The frame attribute
The frame and border attributes

Examples explained


HTML List Examples

An unordered list
An ordered list
Different types of ordered lists
Different types of unordered Lists
Nested list
Nested list 2
Definition list

Examples explained


HTML Form and Input Examples

How to create input fields
Password fields
Checkboxes
Radiobuttons
Simple drop-down box (a selectable list)
Another drop-down box with a pre-selected value
Textarea (a multi-line text input field)
Create a button
Draw a border with a caption around data
Form with an input field and a submit button
Form with checkboxes and a submit button
Form with radiobuttons and a submit button
Send e-mail from a form

Examples explained


HTML Image Examples

Insert images
Insert images from another folder or another server
Background image
Align an image within a text
Let the image float to the left/right of a paragraph
Adjust images to different sizes
Display an alternate text for an image (if the browser can't load images)
Make a hyperlink of an image
Create an image-map, with clickable regions
Turn an image into an image map

Examples explained


HTML Background  Examples

Good background and text color
Bad background and text color
Good background image
Good background image 2
Bad background image

Examples explained


HTML Style Examples

Styles in the head section of an HTML document
Link that is not underlined
Link to an external style sheet

Examples explained


HTML <head> Examples

Set a title of a document
One target for all links on a page

Examples explained


HTML <meta> Examples

Document description
Document keywords
Redirect a user to another URL

Examples explained


HTML Script Examples

Insert a script
Handle browsers that do not support scripts

Examples explained


Previous Next

From http://www.w3schools.com (Copyright Refsnes Data)