HTML Head Tag: Here, we will find out about the HEAD tag in HTML with its definition, syntax and examples.
The HEAD tag appears to assume a less significant job in the HTML record. This is on the grounds that whatever kept in the head component in a roundabout way obvious on the program.
Be that as it may, the head component is having a significant job in the HTML record for the internet browser, as here directions for the internet browser are available likewise one could some extra and significant data of the report about the program, such data is known as the metadata.
A large portion of the metadata of the HTML archive isn’t shown on the internet browser yet at the same time, it could be valuable for the functionality of the website page.
The component additionally contains some other HTML labels which at that point contain the metadata. Different components present in the HEAD tag, are in a settled structure with the tag as the peripheral component.
The syntax for the HEAD tag,
<html> <head> <!--other sub tags of HEAD tag--> <!--Scripts & CSS(s) etc.--> </head> <body> <p> The head element of this document is not <br> directly visible on the web browser. </p> </body> </html>
The output of the above code would be as per the following,
In the above example, the body component is unmistakable to the watcher. The substance in the body is shown by the program while the substance of the head is for the program.
The <title> element
The HEAD component likewise contains the TITLE component. The TITLE component is utilized to give the title of the website page. This title is obvious to the client or guest who visits the site page. The title of the site page given in the title bar of the internet browser.
The beneath example shows the utilization of the TITLE tag of HTML,
<html> <head> <!--Title tag---> <title>The title tag in HTML </title> <!--End of Title tag--> </head> <body> <p>See the title of the page on the title bar.</p> </body> </html>
The output for the above code is as per the following,
The <style> component
The style component is utilized to give styling on the website page. The <style> label utilize the classes, ids or the component to give them inside styling.
The output of the above code is as per the following,
The <link> component
The <link> component is utilized to connect to an outer record to the HTML archive. This outside record could be the templates, for example:
<link href="externalCSSfile.css" rel="stylesheet">