Html (Hypertext markup) this is lesson 3 of learning HTML. In this, we are going to know what is Html tag what is its importance in creating the Html web page. In the first two chapters, we learned what is HTML and how to learn Html. The link for both lesson going to give in the last of this article.
Html tags are not difficult to understand. By practicing it continuously you can become master of HTML tag. In this post, we r going to learn what is Html tag and some basic tags. Which will easy to understand the Html tag? So let’s start HTML lesson 3 What is the Html tag?
What is Html tag?
Html tag r a type of code that is display by their name between two singular brackets (<>) Each tag has their identification and functions. These tags are used from the top (head)to bottom (footer) and in the content area. These tags are generally divided into two parts:-
- Paired Tags
- Unpaired Tags.
These tags are paired. They have both opening and closing tags The opening tag is also called as starting tag which defines with <head> and closing tag defined by inserting slash (/) inside the angular bracket (</head>).
<Head> Html Tag </Head>
The above is an example of a head tag. Which is used to create a head part for web page. That is a paired tag. In this (<Head>) it’s an opening tag and (/<head>) its closing tag. Almost all important tag r paired only.
Paired Tags Example
Html tag - <html> </html> Titel tag - <Titel> </Titel> Body tag - <Body> </Body> Heading tag - <h1> </h1> Paragraph tag - <p> </p> Bold tag - <b> </b> Italic tag - <i> </i>
These tags are not paired but are single and do not have any opening and closing tags. The use of such tags is very less while creating web pages.
Example <Br> This is a line break tag. Which is used in writing a second line after finishing one line during writing a paragraph. As this is an unpaired tag it has no opening and closing tag.
Unpaired tags Example
Image tag - <image> Horizontal Line tag - <hr>
Tim-Berners-Lee started Word wide web for Document Sharing. He then created his first software ENQUIRE. This software was in very simple language. Its job was to send some text from one computer to another. In 1990, due to the demand for new technology, Lee started Browser and Server Software specifying Html language.
While creating browsers and server software, Lee created some special codes to make them work. With the help of these codes, he could give special commands to the Browser. Today we call these codes Html Tags. These tags were written before the web pages were created. The browser and software server already understand the command of all these tags.
Some basic Html tag and their example
Basic paired Html tag
1.DOCTYPE Tag <!DOCTYPE>
By the way, this is not a tag, But Doctype tag tells the browser how the document is written. As we r talking about Html right now it will b written as <!DOCTYPE HTML>. This shows a browser that documents created from HTML language.
2. Html tag- <Html> </Html>
This is the main tag of Html and defines an HTML document Creating an Html document is started with this tag. And all other elements r written in this tag.
3. Head tag- <head> </head>
This tag use for to create the header area of the web page. This tag provides necessary information about a web page <title> <style><script> <link> <meta> all this tag written within the head tag.
4. Body tag <body> </body>
The body tag is used to create a content area of the web page. This is an important tag. Body tag used only once in an HTML document.
5. Title tag <title></title>
The title tag is used to title any web page. It is written inside the Head tag. With the help of the title tag, Browser is able to know what the web page is about.
6. Heading tag- <H1></H1>
This tag is used to write the heading of the document. Heading tags start from h1 to h6 respectively.
7. Paragraph tag -<p> </p>
This tag is used to write a paragraph. By using this tag, you can use any number of paragraphs in your html document.
8.Bold tag -<B> <B>
Bold tag is use to bold (darken) an important text. Any number of Bold tags can use in an html document.
9. Italic tag- <i> </i>
The italic tag is use to make a text italic. This tag can be use multiple times in Html document.
10. Underline tag
Underline tag is use to underline the text. Using this tag, a deep line is drawn under the text.
Basic Unpaired Html Tags:
1. Line break tag- <br>
While writing a paragraph in an Html document, the Line Break Tag is used to finish a line and start the next line. With the help of this tag, the line of the paragraph is alternating rather than straight. Which keeps the size control of a web page.
2. Image tag <img>
The image tag is used to add an image to an HTML document. src, alt, width, height, and style are attributes of all image tags. With the help of which we can see the URL, width, height, etc. of that image. It can give all things.
3. Horizontal tag- <hr>
This tag is meant to specify thematic break in Paragraphs. If you shift from your topic while writing a paragraph, this tag draws a line between those two topics. Which creates a gap between them.
HTML Lesson 1
HTML Lesson 2
What is java