HTML files use tags to define these elements, which are then interpreted by web browsers to render the page visually.
For example, a simple HTML file might look like this:
html
<html>
<head>
<title>My Web Page</title>
</head>
<body>
<h1>Welcome to My Website</h1>
<p>This is a paragraph of text on my web page.</p>
<a href="https://example.com">Click here to visit Example.com</a>
</body>
</html>
- The
<!DOCTYPE html>declaration defines the document type and version of HTML. <html>is the root element that contains all other HTML elements.<head>contains metadata about the web page, like the title.<body>contains the actual content of the page that is visible to the user, like headings, paragraphs, and links.
When you open an HTML file in a web browser, it interprets the HTML tags and displays the content accordingly.
