Information about html tags
HTML --- Hyper Text Mark-up Language .
"If you are learning web development and want to learn about the HTML language, then you are at the right place, here we will be providing you all the necessary information about the tags and elements use in HTML." Lets begin..
What is HTML?
- HTML is a Hyper Text Mark-up Language.
- HTML is used to describe the structure of web pages.
- The element used in HTML tells the browser about how to display the content.
- The HTML consists of series of various elements.
The three main parts of an element can be known as:
- Opening tag – It is used to state from where the element starts to take effect. The tag is written with opening and closing angle brackets. For example, use the start tag <p> to create a paragraph.
- Content – This is the output on the display that other users see.
- Closing tag – The same as the opening tag, but a forward slash is written before the element name. For example, </p> to end a paragraph.
The combination of these three parts will create an HTML element like :
<p> write here the paragraph </p>.
Every HTML page has to use these three tags:
<html> This tag is the root element of the webpage that defines the whole HTML document.
<head> This tag is used to hold the meta information such as the page’s title and charset.
<body> This tag is used to encloses all the content that will appear on the page.
HTML Heading tags:
The heading tags are used to display the title, heading and sub- heading of the web page. In HTML we can use six types HTML heading tags. These range from <h1> to <h6>, where the heading h1 is largest in size, and gets smaller as they move up to h6.
<h1> This heading is used for most important heading </h1>
<h2> This heading is used for less important heading </h2>
<h3> This heading is used for less important heading </h3>
<h4> This heading is used for less important heading </h4>
<h5> This heading is used for less important heading </h5>
<h6> This heading is used for least important heading </h6>
NOTE: These tags should only be used for heading not to increase or decrease the size of text.
List tags :
<li> tag : This tag is used inside the <ol> tag and <ul> tag to denote the lines to be shown.
<ol> tag : This tag is used for denoting the ordered list. In this tags the points are described using the bullet points.
<ol>
<li> This is line 1 </li>
<li> This is line 2 </li>
<li> This is line 3 </li>
<li> This is line 4 </li>
</ol>
<ul> tag : This tag is used for denoting the unordered list. In this tags the points are described using the numbers or letters.
<ul>
<li> This is line 1 </li>
<li> This is line 2 </li>
<li> This is line 3 </li>
<li> This is line 4 </li>
</ul>
HTML image tag:
The image tag is used for adding the images to the website. In HTML image tag we have to write the url of the image using the syntax given below:
Note: The underlined objects are the examples.
< img src = “image.jpg” alt= “notebook” >
The above is the syntax for the image in which src is for the source of the image i.e from where the image is taken and alt is used for giving the name to the image which will be displayed if there is any error in loading the image.
Some elements are used without closing tag. The examples for these tags can be <br> and <hr> tag.
The <br> tag is referred as break tag. It is used to break the line because the HTML does not recognizes the space between the lines.
The <hr> tag is referred as horizontal tag. It is used to put a horizontal line across the webpage.
HTML paragraph tag:
<p> This is for paragraph </p>
This is the syntax for the paragraph tag, the paragraph or lines written inside this tag is shown in the website.
Now we will talk about the main syntax of a website that is not necessary to do but it increases your SEO (search engine optimization) which will help you to get the traffic on your site.
The header tag:
<header> It is used for main topic or the title that is to be shown in the starting of the page </header>.
The pre tag :
The pre tag is used to show the text in the form as it is written, considering the number of lines and spaces given.
Let’s take one example:
<header>
<pre>
<h3> Content main topic contact </h3>
</pre>
</header>
The main tag:
<main> It can be denoted as the main body tag. It is used to write the main body using different tags inside this main tag </main>
Many other tags comes under the main tag:
The section tag: <section> It is used to define the particular section on the webpage </section>
The article tag: <article> It is used to write the information all about that you want to give on the webpage </article>
The aside tag: <aside> The extra or the side space that is used by other things and are not the part of your site like ads </aside>
The div tag: <div> The div is a container for the other elements.
It is a block element that
Takes full width or line </div>
The span tag : <span> The span is also a container like the div tag but
It is a inline container.
Takes as much width and line necessary </span>.
1 Comments
Ek number bhai
ReplyDelete