HTML Introduction
What is HTML?
HTML stands for Hyper Text Markup Language. It is the standard markup language for creating web pages.
- HTML describes the structure of a Web page
- HTML consists of a series of elements
- HTML elements tell the browser how to display the content
Basic HTML Document
Here's an example of a simple HTML document:
<!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> <h1>My First Heading</h1> <p>My first paragraph.</p> </body> </html>
HTML Elements
An HTML element is defined by a start tag, some content, and an end tag:
<tagname>Content goes here...</tagname>
Examples of HTML elements:
<h1>My Heading</h1><p>My paragraph.</p><a href="https://example.com">Link</a>HTML Attributes
HTML attributes provide additional information about HTML elements:
<a href="https://www.example.com">Visit Example.com</a>
In this example, href is an attribute that specifies the URL of the page the link goes to.
Common HTML Tags
HTML headings are defined with the <h1> to <h6> tags.
<h1>Heading 1</h1> <h2>Heading 2</h2> <h3>Heading 3</h3> <h4>Heading 4</h4> <h5>Heading 5</h5> <h6>Heading 6</h6>
<p>This is a paragraph.</p> <b>Bold text</b> <i>Italic text</i> <strong>Important text</strong> <em>Emphasized text</em>
<a href="https://example.com">This is a link</a> <img src="image.jpg" alt="Description of image">
Try It Yourself
The best way to learn HTML is by practicing. Try editing the code below:
<!DOCTYPE html> <html> <head> <title>My Page</title> </head> <body> <h1>Hello World!</h1> <p>This is my first HTML page.</p> </body> </html>
Explore Related Tools
Hand-picked utilities and calculators related to this tool.
