A modern HTML document starts with the HTML5 doctype, then an <html> root element containing <head> metadata and the visible <body> content.
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Page title</title>
</head>
<body>
<h1>Page heading</h1>
<p>Page content.</p>
</body>
</html>
<!doctype html> tells browsers to use standards mode. It is a declaration, not a normal HTML element.
The <head> stores document metadata and resources such as the page title, meta information, stylesheets and scripts.
The <body> contains the content users see and interact with: headings, paragraphs, links, images, forms and application interfaces.
Inside the body, use meaningful elements such as <main>, <nav>, <section>, <article>, <aside>, <header> and <footer> when they match the content. See the standard page layout tutorial.
HTML beginner guide Tags and elements HTML whitespace
Author & Instructor at plus2net
I write and maintain practical tutorials on Python, PHP, SQL, JavaScript, HTML, jQuery, and web development at plus2net. The tutorials focus on clear explanations, working examples, and code that readers can test and adapt while learning.
| saud | 20-02-2013 |
| that is good for me i want to learn moooooore . Thanks. | |
| pratheep | 05-08-2013 |
| very good | |
| madhavagopi | 02-04-2015 |
| A good understanding tags | |
30-10-2023 | |
| I want HTML code some more | |