How to give the value associated with the http-equiv or name attribute in HTML5 ?
The http-equiv and name attribute are specified in the meta tag in an HTML program. The meta tag is included at the head of the HTML document. It is used to define the metadata (data that describes data) about the HTML document.
There are a lot of different elements under meta, but we will be discussing http-equiv and name attribute.
- http-equiv : It sets the information for HTTP response message headers (for example, content). It takes some values like content-security-policy, content-type, default-style, and refresh.
- name: It specifies the type/name of the metadata. It has also a bunch of values that we can use as inputs like application-name, author, description, generator, keywords, and viewports.
When you search on google “geeksforgeeks“, you can notice a description. It is implemented by using the name attribute and by using the content attribute with the respective values to be displayed for the description.
<meta name="description" content="It contains the description for your web application">
HTML code: The HTML program use both the attributes.Comments are added to make you understand in a better way.
Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML course.