W3schools: HTML Basic Examples
W3schools: HTML Basic Examples
Don't worry if these examples use tags you have not learned.
HTML Documents
All HTML documents must start with a document type declaration: <!DOCTYPE html>.
The HTML document itself begins with <html> and ends with </html>.
The visible part of the HTML document is between <body> and </body>.
Example
<!DOCTYPE html>
<html>
<body>
</body>
</html>
Try it Yourself
https://www.w3schools.com/html/html_basic.asp 1/4
12/7/2017 HTML Basic
HTML Headings
HTML CSS MORE
<h1> defines the most important heading. <h6> defines the least important heading:
Example
Try it Yourself
HTML Paragraphs
HTML paragraphs are defined with the <p> tag:
Example
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
Try it Yourself
HTML Links
HTML links are defined with the <a> tag:
Example
Try it Yourself
https://www.w3schools.com/html/html_basic.asp 2/4
12/7/2017 HTML Basic
HTML Images
HTML images are defined with the <img> tag.
The source file (src), alternative text (alt), width, and height are provided as attributes:
Example
Try it Yourself
Previous Next
COLOR PICKER
HOW TO
Tabs
Dropdowns
Accordions
Convert Weights
Animated Buttons
Side Navigation
Top Navigation
Modal Boxes
Progress Bars
Parallax
Login Form
HTML Includes
Google Maps
https://www.w3schools.com/html/html_basic.asp 3/4