Introduction to HTML
What is HTML and how the web works.
On this page
What is HTML?
HTML (HyperText Markup Language) is the standard language for creating web pages. It describes the structure of a web page using a system of tags and attributes.
How the Web Works
When you visit a website, your browser sends a request to a server. The server responds with HTML code, which the browser interprets and displays as a visual page.
Browser sends request to server
Returns HTML, CSS, JS files
Parses HTML and displays the page
Your First HTML Document
Every HTML document follows a basic structure. Try it yourself below โ edit the code and click Run:
- <!DOCTYPE html> - Declares the document type and HTML version
- <html> - The root element of the page
- <head> - Contains meta information about the page
- <title> - Sets the page title shown in the browser tab
- <body> - Contains the visible content of the page
Common HTML Tags
| Tag | Description | Example |
|---|---|---|
| <h1>-<h6> | Headings (h1 is largest) | <h1>Title</h1> |
| <p> | Paragraph of text | <p>Text here</p> |
| <a> | Hyperlink to another page | <a href="url">Link</a> |
| <img> | Displays an image | <img src="pic.jpg"> |
| <ul>/<ol> | Unordered/Ordered list | <ul><li>Item</li></ul> |
| <div> | Block-level container | <div>Content</div> |
HTML Tags
HTML tags are keywords surrounded by angle brackets: <tagname>. Most tags come in pairs - an opening tag and a closing tag with a forward slash.
<tagname>content goes here</tagname>
Try It Yourself
Open the Deoit Editor and build your own page from scratch. Click Run to see your first web page in action!
Practice what you learned in the Deoit Editor โ a free, browser-based code editor.
Open Editor โ