Creating your first HTML page

HTML files are text files, therefore you can create them using text editor.

To start creating web page, open your text editor.

  • Note:

    You can also create and run HTML files on your phone.

For example open notepad editor and write some HTML code or copy the below basic code.

<!DOCTYPE html>



<title> First HTML Page </title>



<h1> Heading </h1>



After creating your code in text file, now save your file with / extension.

For example index/

Run HTML file

After saving your file with / extension, you can run it by double click on it and open it in your favorite web browser.

Now the web browser will read the HTML code and change it in the web page.

First HTML Page



Essential HTML elements

There are four essential HTML elements to create the basic structure of a webpage.

  1. <!DOCTYPE html>
  2. <html></html>
  3. <head></head>
  4. <body></body>
  • <!DOCTYPE html>

    This declaration explains that HTML5 is used in the document.

  • <html></html> :

    This element defines the document as a web page, and it also defines the beginning and end of the HTML document. Because any HTML document begins with <html> and ends with </html>.

  • <head></head>

    This element contains the page title and <meta> tags, moreover you can include the JavaScript and Css scripts in it. In other words, the head of an HTML document contains all the non visual content which help the page to work.

  • <body></body>

    This element contains all the visible content, .i.e, images, links, paragraphs, headings, quotes, lists and plain text. In other words, any thing you are seeing on the webpage, is the body content.


If you find this tutorial helpful, then please Subscribe to our YouTube Channel for video tutorials, and share this article on social media.

Leave a Comment

Your email address will not be published. Required fields are marked *