Introduction to Hypertext Markup Language | HTML


What is HTML?

Html is a hyper text markup language.which is use to create structure of web page.

Hyper text markup language

          <…> : open tag

          </…> : close tag


Structure of HTML

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>Title here</title>

</head>

<body>

    Page content goes here.

</body>

</html>


1) HTML <!DOCTYPE> declaration

All the HTML5 file definitely start with this declaration.

It provides "information" to the browser of the version of the HTML5 document.


Syntax -

<!DOCTYPE html>


2) HTML head tag  

Head tag are use to contain all the head element in the html file. 

In this what ever we written will not show in website.

It contain -


Syntax -

<head> </head>


<!DOCTYPE html>

<html lang="en">

<head>

        <title>Teknowize</title>

    This is my head

</head>

<body>

    

</body>

</html>

 

3) HTML body tag 

It use to define the body of HTML document. it contain image ,tables, list, ….. (all HTML tags) etc.


Syntax -

<body> </body>


For example

<!DOCTYPE html>

<html lang="en">

<head>

        <title>Teknowize</title>

</head>

<body>

    This is my body

</body>

</html>


Output

html body tag

4) HTML title tag  

It is use to change the name of path into tag.

it must be written in head tag.


Syntax -

<title> </title>


For example

<!DOCTYPE html>

<html lang="en">

<head>

    <title> This is my title </title>

</head>

<body>


</body>

</html>


Output

html title tag