Skip to content

Basic Structure

A web page is a document written in HTML (HyperText Markup Language). HTML is the standard markup language for creating web pages and web applications. It defines the structure and content of a web page, including text, images, videos, and other multimedia content.

HTML Document Structure

An HTML document is made up of several components, including the following:

  • <!DOCTYPE html>: This declaration specifies the HTML version being used. In this case, it specifies that the document is written in HTML5.
  • <html>: This element is the root element of an HTML document. It contains all the other elements in the document.
  • <head>: This element contains meta-information about the document, such as its title, links to stylesheets, and other metadata.
  • <title>: This element specifies the title of the document, which is displayed in the browser's title bar or tab.
  • <body>: This element contains the content of the document, such as text, images, videos, and other multimedia content.

Example

Here's an example of a basic HTML document structure:

html
<!DOCTYPE html>
<html>
<head>
	<title>My First Web Page</title>
</head>
<body>
	<h1>Hello, World!</h1>
	<p>This is my first web page.</p>
</body>
</html>

In this example, the document contains a title (My First Web Page) and some content (Hello, World! and This is my first web page.). When viewed in a web browser, the document would display the title in the browser's title bar or tab, and the content in the body of the document.