The <HTML> is a markup language which is used by the browser to manipulate text, images and other content to display it in required format.
Tags in HTML: Tags are one of the most important part in an HTML Document. HTML uses some predefined tags which tells the browser about content display property, that is how to display a particular given content. For Example, to create a paragraph, one must use the paragraph tags(<p> </p>) and to insert an image one must use the img tags(<img />).
There are generally two types of tags in HTML:
- Paired Tags: These tags come in pairs. That is they have both opening(< >) and closing(</ >) tags.
- Singular Tags: These tags do not required to be closed.
Below is an example of (<b>) tag in HTML, which tells the browser to bold the text inside it.
An HTML Document is mainly divided into two parts:
- HEAD: This contains the information about the HTML document. For Example, Title of the page, version of HTML, Meta Data etc.
- BODY: This contains everything you want to display on the Web Page.
Let us now have a look on the basic structure of HTML. That is the code which is must for every webpage to have:
Every Webpage must contain this code. Below is the complete explanation of each of the tags used in the above piece of HTML code:
<!DOCTYPE html>: This tag is used to tells the HTML version. This currently tells that the version is HTML 5.
<html>: This is called HTML root element and used to wrap all the code.
<head>: Head tag contains metadata, title, page CSS etc. All the HTML elements that can be used inside the <head> element are:
We will learn about these in details later.
<body>: Body tag is used to enclosed all the data which a web page has from texts to links. All of the content that you see rendered in the browser is contained within this element.
To learn more about an HTML Document structure, please visit:
- How to convert an HTML element or document into image ?
- HTML Course | Understanding and Building Project Structure
- HTML Course | Basics of HTML
- HTML | DOM HTML Object
- CSS | @document rule
- DOM (Document Object Model)
- How to convert a PDF document to a preview image in PHP?
- How to get position of an element relative to the document or parent using jQuery ?
- HTML | <i> Tag
- Div Tag | HTML
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.
Improved By : 3daleks