Metadata & Title

Metadata and the title are important parts of the HTML document that help describe your webpage. They are placed inside the <head> section and are not directly visible on the webpage itself.

What is Metadata

Metadata means information about the webpage. It provides details to the browser and search engines about the content of the page.

Metadata does not appear on the screen, but it plays an important role in SEO, performance, and browser behavior.

Common Types of Metadata

Some common metadata elements include description, keywords, author, and viewport settings.

The description gives a short summary of the page.
Keywords help search engines understand the topic of the page.
Author specifies who created the page.
Viewport helps control how the page looks on different screen sizes, especially on mobile devices.

What is Title

The title defines the name of the webpage. It appears on the browser tab and is also used by search engines when displaying results.

A clear and relevant title helps users understand what the page is about.

Example

Here is a simple example of metadata and title inside the head section <!DOCTYPE html> <html> <head> <title>My Website</title> <meta name=”description” content=”This is a sample web page”> <meta name=”keywords” content=”HTML, beginner, web design”> <meta name=”author” content=”Your Name”> <meta name=”viewport” content=”width=device-width, initial-scale=1.0″> </head> <body> <p>Welcome to my website</p> </body> </html>

Summary

Metadata provides useful information about the webpage, while the title gives the page its name. Both are essential for better user experience and search engine optimization.

Home » HTML Fundamentals (Beginner) > Basic HTML Structure > Metadata & Title