What is HTML?
A Simple HTML Document
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
</html>
Example Explained:
<!DOCTYPE html>
: Declares this document as an HTML5 document.<html>
: The root element of an HTML page.<head>
: Contains meta information about the HTML page.<title>
: Specifies a title for the HTML page (shown in the browser's title bar or page tab).<body>
: Defines the document's body, a container for all visible contents like headings, paragraphs, images, hyperlinks, etc.<h1>
: Defines a large heading.<p>
: Defines a paragraph.