Note: All html tags have a beginning tag and an end tag.
Example 1:
Beginning–
<p>
End–
</p>
Example:2
Beginning–
<head>
End–
</head>
I am going to show you some HTML tags with examples of how they can be used
Below are the basic tags commonly used in html.
<html>
</html>
This is a standard tag which is used at the beginning and at the end of a document
Example:
<p>
</p>
This tag is used to create a paragraph.
It serves the purpose of creating a gap or moving texts to another line.
Example:
Html and css
<p> what is html</p>
<a>
</a>
This tag is used to link web pages.
The main attribute of this tag is "href" (HyperText Reference)
Example:
<a href="https://prexie.hashnode.dev/">html
</a>
<b>
</b>
This tag is used to make text appear in bold. It places emphasis on a particular word, to make it recognized as an important word.
Example:
<b>
this text is in bold
</b>
<strong>
</strong>
This tag is used to bold text with emphasis
It shows that the text is strongly emphasized on.
Example:
<strong>
this is the effect of the strong tag
</strong>
<body>
</body>
This is the main part of the document in which the HTML is embedded.
<br>
This html tag is used to input blank lines and create large space. It makes a webpage easier to view and understand
Example:
This article serves as a reference.<br><br>
If you forget the function of any html tag<br><br>
i will be here to guide you<br><br>
precious
<div>
</div>
This tag is used to group and divide parts of an HTML. Example, on a clothing website </div>
will be used to classify different clothing into sections like shoes, casual wear, office wear etc.
Example:
<head>
</head>
This tag contains the metadata i.e the data about the page description, title, viewport setting, style etc. It is not displayed on the webpage.
<h1>
</h1>
<h2>
</h2>
... <h6>
</h6>
This tag is used to create titles and heading.
It is used in other for readers to understand the important and specific part of the documents. It helps to generate a table of content.
Example:
<h1>
heading 1
</h1>
<h2>
heading 2
</h2>
<h3>
heading 3
</h3>
<h6>
heading 6
</h6>
<i> </i>
This HTML tag makes text appear in italics. Italics helps to place emphasis on a word or sentence to make the reader know it's importance.
Example:
<i>
this text is in italics
</i>
<img> </img>
This tag is used to input images into a webpage. It's most important attribute is src (source). It indicates the source and location of the image.
<ol>
</ol>
This tag stand for an ordered list. It means that all items listed will be numbered automatically. It also includes <li>
List Items.
Example:
<ol> <li> number </li> <li> number </li> <li> number </li> </ol>
<ul>
</ul>
This tag stands for an unordered list. It makes listed items appear in bullet form.
Each item will have a bullet.
Example:
<ul> <li>i am a technical writer</li> <li> i love remote jobs</li> <li>i am available to volunteer</li> </ul>
<li>
</li>
This tag is used within an ordered (<ol>
) and unordered list (<ul>
).
<span>
</span>
It's function is to style a portion of a text
It creates room for styling of different text in sentence.