HTML 000: Basic structure

Neha
GigaGuardian
Published in
2 min readDec 20, 2022
ImageSource

Introduction

HTML (Hypertext Markup Language) is a standard markup language used for creating and formatting web pages. It provides a way to structure and organize content, such as text, images, and videos, on the web. HTML is written in the form of HTML elements, which consist of tags enclosed in angle brackets (e.g. <p> for a paragraph). These tags tell the web browser how to display the content.

HTML is not a programming language, but rather a markup language that defines the structure and layout of a web page. It allows developers to create web pages that can be viewed in any modern web browser. HTML is the foundation of all web pages and is essential for anyone who wants to create or design web pages.

The basic structure of an HTML document consists of the following elements:

  1. The doctype declaration, which specifies the version of HTML used in the document (e.g. <!DOCTYPE html>)
  2. The html element, which represents the root of an HTML document and contains all other elements (e.g. <html>)
  3. The head element, which contains information about the document, such as its title, and links to external resources, such as stylesheets (e.g. <head>)
  4. The body element, which contains the main content of the document, such as text, images, and videos (e.g. <body>)

Here is an example of a simple HTML document with these elements:

<!DOCTYPE html>
<html>
<head>
<title>My Website</title>
</head>
<body>
<h1>Welcome to my website</h1>
<p>This is where I share my thoughts and ideas.</p>
</body>
</html>

In this example, the doctype declaration specifies that the document uses HTML5, the html element wraps the entire document, the head element contains the title of the document, and the body element contains the main content of the document.

I hope you enjoyed this introduction to the basics of HTML!

Follow me: LinkedIn, Twitter

--

--