Head Elements
4 min read
The head contains the title, meta tags, CSS links, and script references. Use rel='preload' for critical assets. Add a canonical link to avoid duplicate content. The title appears in browser tabs and search results.
Inside the <head>
<head>
<meta charset="UTF-8">
<title>Page Title</title>
<link rel="stylesheet" href="style.css">
<link rel="icon" href="favicon.ico">
<link rel="canonical" href="https://example.com/page">
<script src="app.js" defer></script>
<style>body { margin: 0; }</style>
</head>