HTML Document
HTML Document
What is HTML?
• HTML (HyperText Markup Language) is the standard
language used to create web pages.
• It tells the browser how to structure and display content
like text, images, and links on a webpage.
Attributes in HTML
Attributes provide additional information about elements.
They are written inside the opening tag.
Example:
<a href="https://example.com" target="_blank">Visit
Example</a>
• href: Specifies the URL for the link.
• target="_blank": Opens the link in a new tab.
Practice Example
<!DOCTYPE html>
<html>
<head>
<title>My Web Page</title>
</head>
<body>
<h1>Hello, World!</h1>
<p>HTML is fun to learn.</p>
<img src="https://via.placeholder.com/150" alt="Sample
Image">
<a href="https://google.com" target="_blank">Search on
Google</a>
</body>
</html>