Home Education How to learn HTML and use – Lesson 2

How to learn HTML and use – Lesson 2

What is HTML

Today’s topic is, How to learn HTML is the full form of Html, Hypertext markup language. It is used in creating web pages. HTML is also the most used in creating the structure of a website. If you have to create your own website, then learning Html language is very important for you.

To learn HTML language and make web pages with its help, you need to know about HTML tags and HTML attributes. Html tags and Html attributes are used to give the best structure to any web pages. Html is a very simple markup language. In this article how to learn HTML, we will know what is Html element’s and their Html attributes, and how to create web pages with their help. So let’s know step by step

What is HTML

How to learn HTML

To learn HTML language, it is necessary to have knowledge of Html tags and Html attributes. Actually Html is just the name of this markup language, the rest of the work is done with these tags and attributes. If you know all these Html tags and their attributes, then you can become an Html expert. Having knowledge of all these, creating a website for you will be a game of left hand. So let’s know in this post. What are HTML tags and HTML attributes and how are they used.

What is HTML Tag

The codes used to create the structure of a web page are called HTML tags or HTML elements. This tag is a simple text between angular brackets (<>).

For example : (<h1>)This is a Heading tag. Which is defined by the starting word H of the heading. Most tags are also defined by their first word. The opening and closing tags of these tags are definitely there. It is also taken special care while creating an HTML file that the opening tag must be written first and the closing tag at the end, only then that Html file will work correctly.

If you have to type the heading in a web page. Then you will start with its opening tag <h1> Now after writing your heading, we will close this heading tag by writing its closing tag </h1> Similarly, the rest of the tag is also started from the opening tag and closes on the closing tag. Understand from the example below.

<H1> how to learn html </h1>

The following are the two types of Html tags:

Paired html tags
Unpaired html tags.
Paired html tags: Tags that have both opening and closing tags are called paired html tags. Most HTML tags are paired. In the example below, the heading tag is a paired tag. Which has opening tag <hi>and closing tag </h1>

<H1> Learn HTML </h1>

Unpaired HTML tags: These tags have no opening and closing tags. It is a kind of singular html tags. They ar written in this way. The example below has a line break tag (<Br>). While writing a paragraph, such a tag is used to end one line and write another line.


By this article, you must have known what HTML tags are and what html element’s are and their attributes. So let’s know now about some html tags and their usage, in which they are use.

Some Basic HTML Tags and their Use

1. DOCTYPE tag - This tag explains the type of a document. Like here the type of this documnet is html. This tag is defined with <! DOCTYPE>.

2. Html Tag - This tag is the main tag of html language. The html tag is defined with <html>. To start creating html document from such tag is started. All other tags are written within the opening and closing tags of this html tag.

3. Head Tag - The head part of a web page is created with the help of this tag. Within the head tag, the title, meta description and keyword tag of that web page are written. Let's define it with <head>.

4. Body Tag - The content area of ​​the web page is started with this tag. Body tag is defined with <Body>. Heading tag, Paragraph tag etc. These are written inside this tag. The body area of ​​a web page is designed with the help of this tag.

5. Title Tag - This tag is used to write the title of a web page. This tag is defined with <title>.

6. Heading Tag - This tag is used to write Heading in the content of web page. The heading tag is defined with <h1>. The 6 heading tag can be used in a content. Whose tags are <h1>, <h2>, <h3>, <h4>, <h5>, <h6> respectively.

7. Paragraph Tag - It is used to write a paragraph. You can use several paragraph tags in one content. This tag is defined with <p>.

8. Line Break Tag - When writing a paragraph, a line break tag is used to finish a line and start the next line. This tag is defined by <br>.

9. Bold Tag - Bold tag is used to bold (darken) an important text. This tag is defined with <B>.

10. Underline Tag - This tag is used to underline a latter. It is defined with <u>.

11. Italic Tag - This tag is used to italic a latter. It is defined by <i>.

Also read- what is java

What is HTML Attributes?

HTML Attributes ar used to provide additional information about an Html element (tag). These attributes ar written in two parts in the html file. Its first part is Attributes Name and the second part is its value. These attributes ar used in an Html file with the opening tag of any Html elements. See the example below –

<h1 attrname= "value"> How to learn HTML </h1>

This is a heading tag in the example given above. Which indicated by its opening tag h1 and closing tag h2. Now as we have told you above, html attributes provide additional information about html elements. So if we have to change the color of the heading of this html file, then here we will use the attributes from which the font color can be changed.

There are many such attributes, with the help of which we can extra configure html tags. In html file these attributes ar always written with the opening tag of any html elements. As stated in the example above. An html attributes represented by writing its name and its value.

In the example given above, you can see, an attribute example given inside the opening tag h1 of the heading tag. Here any html attributes can be name instead of attr-name. Then its value is written inside the Quotation marks [“”]. Similarly, the rest of the HTML attributes also written.

Some Basic HTML Attributes and Their Use

  1. Html href attribute – This attribute is use to join two web pages. This attribute written in the opening tag of the tag. tag also called hyperlink tag. The tag is use to link a text or image. This tag allows to go to another web page. In the example below, the href attribute written with the opening tag of a tag. Here href is the name of this attribute, and https://rawbackmedia.com its value.
<a href= "https://rawbackmedia.com"> rawbackmedia.com </a>
  1. Html src attribute – If you want to add an image to an Html file, and you want to take that image from your computer or a website. So the src attribute used to set the source address of this image file. If the image fileis in the same folder on the computer where the html file saved, then the use of src attribute will b something like this.

In the following example, HTML is the file name of an image. Here the src attribute written in the opening tag of the image tag with its name – src and its value – HTML .jpg.

<image src= "HTML.Jpg"> </image>

Second example, if image file saved in another folder of computer then use of src attribute will something like this. In this example, the image file is inside the image folder in the computer’s download folder. Similarly, whichever image file saved in your folder, write the name of that folder after the slash, then your image will show in that HTML file.

<image src= "Download/image/HTML.jpg"> </image>

Third example, if the image file is in the form of a url, then the use of src attribute would be something like this.

<image src= "https://rawbackmedia.com/HTML.jpg> </image>

HTML So friends hope you like my post. In further posts, we will learn about them in more detail. plz, comment if any doubt.

also read


Please enter your comment!
Please enter your name here