HTML stands for Hypertext Markup Language, and it’s the most generally used language to put in writing Net Pages.
- Hypertext refers back to the approach by which Net pages (HTML paperwork) are linked collectively. Thus, the hyperlink out there on a webpage is known as Hypertext.
- As its title suggests, HTML is a Markup Language which suggests you utilize HTML to easily “mark-up” a textual content doc with tags that inform a Net browser construction it to show.
Initially, HTML was developed with the intent of defining the construction of paperwork like headings, paragraphs, lists, and so forth to facilitate the sharing of scientific data between researchers.
Now, HTML is being broadly used to format internet pages with the help of different tags available in HTML language.
Basic HTML Document
In its easiest kind, following is an instance of an HTML doc −
<!DOCTYPE html> <html> <head> <title>This is document title</title> </head> <body> <h1>This is a heading</h1> <p>Document content goes here.....</p> </body> </html>
<!DOCTYPE html> <html> <head> <title>Title</title> </head> <body> <h1>Heading First</h1> <p>Heading Plus.</p> </body> <footer>this is footer</footer> </html>
As told earlier, HTML is a markup language and makes use of various tags to format the content. These tags are enclosed within angle braces <Tag Name>. Except few tags, most of the tags have their corresponding closing tags. For example, <html> has its closing tag </html> and <body> tag has its closing tag </body> tag etc.
Above instance of HTML doc makes use of the next tags −
|Sr.No||Tag & Description|
|1||<!DOCTYPE…>This tag defines the document type and HTML version.|
|2||<html>This tag encloses the complete HTML document and mainly comprises of document header which is represented by <head>…</head> and document body which is represented by <body>…</body> tags.|
|3||<head>This tag represents the document’s header which can keep other HTML tags like <title>, <link> etc.|
|4||<title>The <title> tag is used inside the <head> tag to mention the document title.|
|5||<body>This tag represents the document’s body which keeps other HTML tags like <h1>, <div>, <p> etc.|
|6||<h1>This tag represents the heading.|
|7||<p>This tag represents a paragraph.|
To be taught HTML, you have to to check numerous tags and perceive how they behave, whereas formatting a textual doc. Studying HTML is easy as customers must be taught the utilization of various tags to be able to format the textual content or pictures to make a stupendous webpage.
World Large Net Consortium (W3C) recommends to make use of lowercase tags ranging from HTML 4.
HTML Document Structure
A typical HTML doc could have the next construction −
<html> <head> Document header related tags </head> <body> Document body related tags </body> </html>
We are going to examine all of the header and physique tags in subsequent chapters, however for now let’s have a look at what’s doc declaration tag.
The <!DOCTYPE> Declaration
The declaration tag is utilized by the online browser to grasp the model of the HTML used within the doc. Present model of HTML is 5 and it makes use of the next declaration −
There are a lot of different declaration varieties which can be utilized in HTML doc relying on what model of HTML is getting used. We are going to see extra particulars on this whereas discussing tag together with different HTML tags.