HTML Paragraphs
HTML paragraphs are defined with the
tag.
Example:
This is a paragraph.
This is another paragraph.
HTML Headings
HTML headings are defined with the
to
tags.
Example:
This is a heading
This is a heading
This is a heading
HTML Links
HTML links are defined with the tag.
Example:
This is a link
The example below will open the linked document in a new browser window or a new tab:
Visit W3Schools!
An anchor with an id inside an HTML document:
Example:
Useful Tips Section
Create a link to the "Useful Tips Section" inside the same document:
Visit the Useful Tips Section
Or, create a link to the "Useful Tips Section" from another page:
Visit the Useful Tips Section
HTML Images
HTML images are defined with the tag.
Example
How to use an image as a link.
Example:
No border around the image, but still a link:
An image-map, with clickable areas:
Example:
An image-map, with clickable areas:
Example:
An HTML Table
If you do not specify a border style, the table will be displayed without borders.
Headings are defined with the
tag instead
Example:
Jill
Smith
50
Eve
Jackson
94
HTML Unordered/ordered Lists
An unordered list starts with the
tag(The ordered with tag).Each list item starts with the
tag.
Example:
The list items are marked with bullets (typically small black circles).
Coffee
Milk
Iframe -An iframe is used to display a web page within a web page.
(The URL points to the location of the separate page.)
Example:
HTML Javacript
Example:
The script below writes Hello World! to the HTML output:
JavaScript can write directly into the HTML output stream:
Example:
document.write("
This is a paragraph
");
The HTML charset Attribute
To display an HTML page correctly, a web browser must know the character set used in the page.
This is specified in the tag:
For HTML4:
For HTML5:
HTML 4 vs HTML 5
In HTML five all tags (even empty elements) must be closed
This is correct:
A break:
A horizontal rule:
An image:
HTML5 Video /Audio- How It Works
Example
To play an audio file in HTML5, this is all you need:
Example