Usage of :
The tag provides metadata about the HTML document. It is used to inform search engines and web browsers about various aspects of the webpage, such as its title, description, and keywords.
Attributes of :
- name: Defines the name of the metadata.
- content: Sets the value associated with the metadata name.
Examples with :
- Set the page title:
<meta name="title" content="Example Webpage">
- Provide a description for search engines:
<meta name="description" content="This is a webpage about HTML.">
- Specify keywords for search engine optimization:
<meta name="keywords" content="HTML, web development, coding">
Simple HTML Example:
<!DOCTYPE html>
<html>
<head>
<title>My Webpage</title>
<meta name="description" content="This is a webpage about HTML.">
<meta name="keywords" content="HTML, web development, coding">
</head>
<body>
<h1>Welcome to my HTML webpage!</h1>
</body>
</html>
Practical Steps:
- Place the tag within the section of the HTML document.
- Use the "name" attribute to specify the type of metadata you want to provide.
- Set the "content" attribute to the appropriate value for the metadata type.
- Save and serve the HTML document to see the effects of the tags.
Accessibility and Ease of Use:
- Provide clear and concise metadata that accurately reflects the webpage's content.
- Use the tag to improve search engine optimization and make your website more discoverable.
- Keep the number of tags to a minimum to avoid clutter and confusion.