HTML stands for Hyper Text markup language. It is the standard markup language for webpages. In simple terms, it is language in which webpages are written.
HTML describes the structure of a webpage. Or HTML creates the skeleton of a website. It consists of a series of elements or tags which tells the browser how to display the content.
Tags are simply the labels for the piece of contents in a webpage. Tags help the browser to identify what kind of content an element is and how to display them on the front end.
Basic tags in HTML
<!DOCTYPE html>: This tag defines/declares the document as HTML 5
<html>: This is the root element of an HTML page
<head>: This element contains the meta information of the document
<title>: Thiselement specifies a title for the document
<body>: This element contains the visible page content
<h1>: This element defines a large heading
<p>: Thiselement defines a paragraph
HTML tags usually come in pairs like
</p>. The first tag in a pair is the start tag, the second tag is the end tag. The end tag is written like the start tag (<p>), but with a forward slash inserted before the tag name (</p>)
HTML tag pair looks like: <tagname>..content ..</tagname>
for eg. <p> my first text </p>
A web browser reads HTML documents and display them. Browser do not displat tags, but decide how to display them, based on the tags. For example, for the previous example, browser display it as :
my first text
HTML page structure is shown below:
<!DOCTYPE html> <html> <head> <title> Title of page </title> </head> <body> <h1> Heading </h1> <p> First paragraph</p> <p> Second paragraph</p> </body> </html>
The browser displays above HTML as: