What is HTML?

Please Share On:

HTML stands for HyperText Markup Language.

HTML is used for creating web pages and their content.

HTML is very easy to learn.

Syntax:

<!DOCTYPE html>
<html>
  <head>
    <title>My Heading</title>
  </head>

  <body>
    <h1>Heading</h1>
    <p>First Paragraph.</p>
  </body>
</html>

Syntax Description:

  • All HTML documents must start with a document type declaration: <!DOCTYPE html>. It helps browsers to display web pages correctly and only write once at the top of the html code.
  • HTML starts with <html> opening tags and ends with </html> ending tags.
  • Next, there is a head with opening <head> and closing </head> tag. Inside head tag, you write the title of the page with opening <title> and closing </title> title tag.
  • All body content will be written inside opening <body> and closing </body> body tags.

Where to write html code:

You can write HTML code in any editor software or you can write in notepad.

Search notepad in your Window and start writing code as below image.

How to save html code:

You can save your HTML code with .html or .htm extension together with your filename. For example, home.html or home.htm

To save the above notepad code. Open File -> Save as and give a name with HTML extension.

home.html

View Your HTML Page:

Go to the location where you have saved your home.html file and open it into your favorite web browser.

Output of home.html file

Live Editor:

Try our live editor by clicking the below button “Try It Yourself“. You can edit and test the live output.

<!DOCTYPE html>
<html>
  <head>
    <title>My Heading</title>
  </head>

  <body>
    <h1>Heading</h1>
    <p>First Paragraph.</p>
  </body>
</html>					


You may be interested in the following topics:

Leave a Reply

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

Copyright @2023. All Right Reserved.


Social media & sharing icons powered by UltimatelySocial