HTML Setup

HTML (Hypertext Markup Language) is the standard markup language used for creating web pages. To set up an HTML document, you need a basic text editor such as Notepad, Sublime Text, or Visual Studio Code.

Here are the steps to create a simple HTML document:

  • open your text editor

  • create a new file.

Add the following code as the first line of your file:

<!DOCTYPE html>

Add the html open tag to define the beginning of your web page, after you have added all content in the web page you close the html tag as shown below

Note: any tag opened must be closed.

<html>
</html>

After the html open tag, add the head section:

<html>
  <head>
  </head>
</html>

Within the head section, add a title for your document:

<html>
  <head>
    <title>My First HTML Page</title>
  </head>
</html>

Add the body section, which contains the content of your page:

<html>
  <head>
    <title>My First HTML Page</title>
  </head>
  <body>
  </body>
</html>

Within the body section, add some content like a header and a word paragraph:

<html>
  <head>
    <title>My First HTML Page</title>
  </head>
  <body>
    <h1>Welcome to my website</h1>
    <p>This is my first HTML page.</p>
  </body>
</html>

Save the file with ".html" extension.

for example: "index.html".

When you open the file in a web browser this is the result you will get.

This is a basic HTML setup, and you can continue to add more elements and styles to create a more complex website.

Last updated