HTML Document Structure and Meta Information

Document Head Elements

This page demonstrates various elements that go in the HTML head section:

Meta Tags Used in This Document

Base Element Example

If we had a base element, all relative links would be relative to that base URL.

Link Elements

Link elements (in the head) can reference:

Script Placement

Scripts can be placed in the head or body. Here's a simple inline script:

Current time: Click button to see time

No Script Content

Document Structure Elements

HTML5 Semantic Elements

Article Header

Published on

Article Section

This is the main content of the article. Articles are self-contained pieces of content.

Figure and Figcaption

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Example</title>
</head>
<body>
    <h1>Hello, World!</h1>
</body>
</html>
Figure 1: Basic HTML document structure

Comments in HTML

HTML comments are written between <!-- and --> tags.

Character Entities Reference

Character Entity Name Entity Number Description
< &lt; &#60; Less than
> &gt; &#62; Greater than
& &amp; &#38; Ampersand
" &quot; &#34; Quotation mark
© &copy; &#169; Copyright
® &reg; &#174; Registered trademark

Document Information

Document Type:
HTML5
Language:
English (en)
Character Encoding:
UTF-8
Viewport:
Responsive (width=device-width, initial-scale=1.0)