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.
How HTML is Displayed
Web browsers like Chrome, Firefox, and Edge interpret
HTML and display the structured content.
HTML is not case-sensitive, but it is a good practice to
use lowercase for tags.
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>