Choose Your Language
How to Learn HTML For Beginners The Easy Way | HARTRON EXAM

How to Learn HTML For Beginners The Easy Way

How to learn html

How to Learn HTML For Beginners The Easy Way
How to Learn HTML For Beginners The Easy Way

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

To learn HTML language and create web pages with its help, you need to know about HTML tags and HTML attributes. Only 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 are Html element’s and their Html attributes, and how to create web pages with their help. So let’s know step by step-

Topics

  • How to Learn HTML – (How to Learn HTML)
  • What is HTML Tag
  • What is HTML Attributes?
  • final opinion

How to Learn HTML – (How to Learn HTML)

To learn HTML language, it is necessary to have knowledge of Html tags and Html attributes. Actually Html is only the name of this markup language, rest of the work is done by these tags and attributes. If you know all these Html tags and their attributes then you can also become an Html expert. Having knowledge of all this, creating a website for you will be a left-handed game. So let’s know now 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 element’s. 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 of the tags are also defined by their first word. These tags definitely have opening and closing tags. Even while creating an html file, special care is taken that the opening tag of the tag used and the closing tag at the end must be written, only then that html file will work properly.

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

<h1> html kaise sikhe </h1>

There are two types of Html tags as follows:

Paired html tags
Unpaired html tags.

Paired html tags: The tags which 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. Whose opening tag is and closing tag </h1>.

<h1> Learn HTML </h1>

Unpaired HTML tags: These tags do not have any opening and closing tags. These are a kind of singular html tags. They are written like this. In the example below, there is a line break tag (<Br>). While writing a paragraph, such a tag is used to end one line and write another line.

<br>

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

Some Basic HTML Tags and Their Uses

Some Basic HTML Tags and Their Uses
Some Basic HTML Tags and Their Uses

1 DOCTYPE tag – This tag explains the type of a document. Like here the type of this document is html. This tag is defined with .

2 Html Tag – This tag is the main tag of html language. HTML tag is defined with . Creating an HTML document is started with such a tag. 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 i.e. the upper part is made with the help of this tag. Within the head tag, the title, meta description and keyword tag of that web page are written. It is defined with .

4 Body Tag – The content area of ​​the web page is started with this tag. The body tag is defined with . Heading tag, Paragraph tag etc. It is written inside this tag. With the help of this tag, the body area of ​​a web page is designed.

5 Title Tag – This tag is used to write the title of a web page. This tag is defined with .</p> <p>6 Heading Tag – This tag is used to write the heading in the content of the web page. The heading tag is defined with <h1>.

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

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

8 Line Break Tag – While writing a paragraph, line break tag is used to end a line and start the next line. This tag is defined with <br>.

9 Bold Tag – Bold tag is used to make an important text bold. 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 italicize the latter. It is defined with <i> .

What is HTML Attributes

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

<h1 attrname=”value”>Html Kaise Sikhe </h1>

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

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

In the above example you can see, an attribute example has been given inside the opening tag h1 of the heading tag. Here attr-name can be the name of any html attribute. After that its value is written inside the quotation marks [ ” ” ]. Similarly, the rest of the HTML attributes are also written.

Some Basic HTML Attributes and Their Use

1 Html href attribute – This attribute is used to join two web pages. This attribute is written in the opening tag of <a> tag. <a> tag is also called hyperlink tag. The <a> tag is used to link a text or image. This tag allows to go to another web page. In the example below, the href attribute is written with the opening tag of a tag. Here href is the name of this attribute, and https://hartronexam.com is its value.

<a href=”https://hartronexam.com”> Hartronexam.com </a>

2 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 any website. So the src attribute is used to set the source address of this image file. If the image file is in the same folder of the computer where the html file is saved, then the use of the src attribute will be something like this.

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

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

Second example, if the image file is saved in another folder of the computer, then the use of the src attribute will be something like this. In this example the image file is inside the image folder in the download folder of the computer. Similarly, in whichever folder you have the image file saved, write the name of that folder with a slash, only then your image will be shown 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 the src attribute would be something like this.

<image src=”https://hartronexam.com/HTML.jpg> </image>

Final opinion

So friends, hope you liked this post. To learn Html, it is important that you learn html element’s and their attributes well. In the next post, we will know about them in more details. If you liked this post How to Learn HTML, then do not forget to like, share, comment on it.

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: