Getting Started with HTML: An Introduction to Markup

Welcome to the first post in our HTML Basics series! In this post, we’ll take the first step in our journey to understanding web development by diving into the world of HTML (Hypertext Markup Language). HTML is the foundation of every web page, allowing us to create the structure and content that users see in their browsers.

What is HTML?

HTML is a markup language used to create the structure of web pages. It consists of a series of elements, each surrounded by opening and closing tags, which define the content and layout of the page. HTML elements can include headings, paragraphs, lists, images, links, and more.

Anatomy of an HTML Element:

Let’s break down the basic structure of an HTML element.

HTML
<tagname>Content goes here</tagname>

Basic HTML Document Structure:

Every HTML document follows a basic structure, which includes the following elements:

HTML
<!DOCTYPE HTML>
<html>
  <head>
    <title>Title of the Document</title>
  </head>
  <body>
    <!-- Content goes here -->
  </body>
</html>

Your First HTML Document

Now that we’ve covered some of the basics, let’s create our first HTML document! Open a text editor, for example, Visual Studio Code, and type the following code:

HTML
<!DOCTYPE HTML>
<html>
  <head>
    <title>My First HTML Document</title>
  </head>
  <body>
    <h1>Hello, World!</h1>
    <p>This is my first HTML document. Welcome to the world of web development!</p>
  </body>
</html>

Save the file with a .html extension, for example: index.html, and open it in your web browser. Congratulations! You’ve just created your first HTML document.