HTML- INTRODUCTION Page-1

HTML BASICS TO ADVANCE TUTORIALS

HTML Introduction


Here in this tutorial you can learn HTML from the basics.

A Simple Example of HTML

<!DOCTYPE html>
<html lang="en">
<head> 
<title>HTML Example</title>
     <style>
body{
color: green;
}
     </style>
</head>
<body>
<h1>This is a heading 1</h1>
<h2>This is a heading 2</h2>
<h3>This is a heading 3</h3>
<h4>This is a heading 4</h4>
<h5>This is a heading 5</h5>
<h6>This is a heading 6</h6>
<p>This is a paragraph.</p>
</body>
</html>

If you want, you can test on your local machine. For this you need a simple text editor(Notepad, Notepad++, etc.,) and a latest browser(Mozilla firefox , Google Chrome , etc.,)
If you set these two things in your local machine, Then you can type the above code in your editor and save it as 'html_1.html' in your local machine. Html files must be save with the extension '.html' after file name. To execute the code just right click on the file and select open with 'your favorite browser'.


<!DOCTYPE html>


In HTML first line of code is <!DOCTYPE html> which tells to the browser, this is a HTML5 document.

<html>

this is a root element in html document.

<head>

It holds meta information in the document.

<title>

It specifies a title of the document.

<style>

we can give a new look to the html document with the help of 'style'.

<body>

It shows the main content of the document for what we are preparing.

<h1> <h2> <h3> <h4> <h5> <h6>

These are the default headers in html.

<p>

This is a paragraph tag.
best practice is when we open any tag then we must close that tag at the end. for all above tags we need to close at the end by preceding with '/ ' for example: <p> and </p>
Currently we are using HTML5. We have five more versions of HTML they are like
Version Introduced year
HTML 1991
HTML 2 1995
HTML 3.2 1997
HTML 4.01 1999
XHTML 2000
HTML 5 2014

We will learn common and basic things from html to advance level through HTML.
Syntax will be discussed in next page.