HTML Fundamentals Tutorial
About Lesson

An HTML document is structured using specific elements that define its layout and content. The basic structure of an HTML document includes the following components:

  1. Document Type Declaration (DOCTYPE): Specifies the version of HTML being used and ensures proper rendering by web browsers.

  2. HTML Element: The root element of an HTML document, encapsulating all other elements.

  3. Head Element: Contains meta-information about the document, such as the title, character encoding, and links to external resources like stylesheets and scripts.

  4. Body Element: Encloses the main content of the document, including text, images, links, and other elements visible to users.

<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>Sample HTML Document</title>
	</head>
	<body>
		<h1>Welcome to My Website</h1>
		<p>This is a sample HTML document.</p>
	</body> 
</html>

Understanding these fundamental components is essential for building web pages with HTML. In the subsequent sections of this tutorial, we’ll explore HTML elements, attributes, forms, semantics, multimedia, and more, enabling you to create rich and interactive web experiences.

Join the conversation