HTML BASIC

 

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>

<html>

<head>

<title> First HTML Page </title>

</head>

<body>

<h1> Heading </h1>

</body>

</html>

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

Heading

 

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.

Was this post helpful?
Let us know if you liked the post. That’s the only way we can improve.
Yes0
No0
Powered by Devhats

Leave a Comment

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