Head
<head>
Tag Key Components of the
<title>
The <title>
tag defines the document’s title, which is displayed in the browser tab.
<title>Document Title</title>
<meta>
The <meta>
tag is used for providing essential metadata like character encoding, description, author, and keywords.
<meta charset="UTF-8" />
<meta name="description" content="Learn HTML" />
<meta name="keywords" content="HTML, Tutorial" />
<meta name="author" content="Your Name" />
<link>
The <link>
tag is used to link external resources such as CSS files.
<link rel="stylesheet" href="styles.css" />
<style>
The <style>
tag is used to define internal CSS styles directly within the document.
<style>
body {
background-color: lightblue;
}
</style>
<script>
The <script>
tag is used to include external or inline JavaScript, enabling interactive functionality.
<script src="script.js"></script>
<base>
The <base>
tag sets a base URL for all relative links in the document.
<base href="https://institute.qarpeo.com" />
Conclusion
The <head>
element is crucial for defining the document’s metadata, title, links to stylesheets, scripts, and other necessary settings. It plays a vital role in how the webpage is structured, displayed, and understood by both browsers and search engines.