DEV Community

Cover image for HTML tags | head
Carlos Espada
Carlos Espada

Posted on • Edited on

1

HTML tags | head

It contains machine-readable information (metadata) about the document. It must be the first element of an <html> element.

Metadata is not displayed and it typically defines the document title, character set, styles, scripts, and other meta information.

The following elements can go inside the <head> element:

  • <title> (required in every HTML document)
  • <style>
  • <base>
  • <link>
  • <meta>
  • <script>
  • <noscript>

The start tag may be omitted if the first thing inside the <head> element is an element. The end tag may be omitted if the first thing following the <head> element is not a space character or a comment.

HTML5-compliant browsers automatically create a <head> element if its tags are omitted in the markup. This auto-creation is not guaranteed in ancient browsers.

  • Type: -
  • Self-closing: No
  • Semantic value: No

Definition and example | Support

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

Retry later
Retry later