Hello readers, in this lesson we will know about the HTML in simple words. So let’s get started.
What is HTML?
Tim Berners-Lee firstly created the HTML.
HTML stands for Hyper Text Markup Language. Let spilt full-form it in two parts to get its real meaning.
- Hypertext: Hypertext allow you to jump to other section in a document. Like when you click on a link, document jump to the page which is linked to it. Or in simple word, a link is hypertext.
- Markup Language: It is a way to tell the browser to control and process the text. HTML use 2 things, tag and attributes.
Tags and attributes are the base of the HTML.
Tags & Attributes
Tags and attributes are the basic of HTML. An HTML document is a collection of tags. A tag might not have an attribute while others have many attributes.
What is an HTML Tag?
An HTML tag represents a markup. Like for using a heading
<h1>tag is used. Most of the tags have an opening and closing scheme. In closing
</h1>is used. For heading, we have to put our heading in between the opening and closing of the tag.
<h1>This is a Heading.</h1>
Some tag like
<br>, <hr>does not have a closing tag. Don’t worry, We will learn about these tags in the next lesson.
What is an attribute?
An attribute adds an additional property to a tag. Attributes are used within the opening tag.
<a href="https://selfstudypoint.in/classroom" title="Self Study Point" target="_blank">Self Study Point ClassRoom</a>
Here a is a tag, which uses for linking document, and href, title and target are it’s attributes. Some attributes are tag specified, like href is use with a tag, you cannot use it h1 tag. If we just want to add link,
<a href="https://selfstudypoint.in/classroom">Self Study Point ClassRoom</a>is enough. But using other 2 attributes, we added more properties to this link. Like
target="_blank" open document in new tab. If it is not added, the link will open in the same tab. And with using title attribute, when you put the mouse pointer on the link, it’s value will be seen.
I think tag and attribute concept is clear to you. If not, then don’t worry, when we study it, it will be cleared.
Points to remember:
- When using a tag inside another tag, then the inner tag will be closed first. Like
<h1><span>This is a Heading.</span></h1>.
- If an open-close tag is using then it must be closed. If not then it takes next tags inside it until tag-closing is not found.
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?