What is the HTML page structure? Explain with example
Every HTML page has the same basic structure: a DOCTYPE, then the html element, which has a head (information about the page) and a body (the visible content).
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My Page</title>
</head>
<body>
<h1>Hello</h1>
<p>Page content.</p>
</body>
</html>
<!DOCTYPE html>tells the browser it is HTML5.<head>has the title, charset, styles and scripts. It is not shown on the page.<body>has everything the visitor sees.
More in HTML Page Structure.
Learn more about the similar topics:
| Tutorials |
|---|
| No Content Found. |
| Exercises & Assignments |
|---|
| No Content Found. |
| Interview Questions & Answers |
|---|
| No Content Found. |