Which HTML element tag can be used to store information about a website or its metadata?
Published August 26, 2021
The best HTML element to store information regarding a website that is not visible to the user, website metadata, or code that can be read by the system to execute and show the webpage is the
head HTML element tag.
For example, the
head HTML elements tag is used to add
title HTML element tags which are not used by the user directly but are needed by the system to execute and show the webpage to the user.
head HTML element tag can be written like this,
<!-- Usage of the 'head' HTML element tag --> <html lang="en"> <!-- 'head' HTML element tag --> <head> </head> <body> Hello World </body> </html>
Now inside this
head HTML element tag, we can use the meta tags like
title, etc. to supply information to the system for execution or store metadata for other purposes.
For an example, a simple
head HTML element tag may look like this,
<html lang="en"> <!-- 'head' HTML element tag with some meta tags used by the system for executing and showing the webpage --> <head> <title>Hello World!</title> <link rel="stylesheet" href="main.css" /> <script src="js/app.js"></script> </head> <body> Hello World </body> </html>
See the above code live in JSBin.
That's all 😃!