Hi there everyone. ๐ How's your weekend going?
Hope you are doing well. ๐
In this article, I'm going to share a brief description of a group of HTML tags - 'text content'
Prerequisites ๐
- Willing to code.
Definitions ๐
HTML tag:
- In HTML, a tag is used to create an element.
- A tag's name is enclosed within the angle brackets
<
and>
Example -<p>
, wherep
denotes a paragraph.Note that tags are used in a pair where there is an opening tag like
<p>
and a closing tag like</p>
HTML element:
- An element is a part of a webpage.
- It can be data, text, or an image.
Text content elements ๐ท
- These elements in HTML are used to organize blocks or sections of the content, which are placed within the pair of tags.
- They help the browser to identify the purpose or structure of the content in a webpage.
Elements List ๐
โค <blockquote>
- It indicates that the enclosed text is an extended quotation.
Example:
<blockquote>Never wait for an inspiration. Just get start to learn coding.<br> keep coding, keep growing...!</blockquote>
Never wait for inspiration. Just start to learn to code.
keep coding, keep growing...!
โค <dd>
- It provides the description or definition for the proceeding term
<dt>
in a description list.<dl>
- Example:
<dl> <dt>Term1</dt> <dd>Description of the term1.</dd> </dl>
-
Term1
Description of the term1.
โค <div>
- It is a division element, which is used to add CSS styling to the content.
- Example:
HTML
<div class="body"> <h3>This is a heading</h3> </div>
CSS
.body{ background color: lightgray; }
โค <dl>
- The element encloses a list of terms and their definitions.
- Example:
<dl> <dt>Term2</dt> <dd>Description of term2</dd> </dl>
โค <dt>
- It specifies a term in a description list followed by the tag
<dl>
- Example:
<dl> <dt>Term3</dt> </dl>
โค <figcaption>
- It describes the contents of its parent element
<figure>
- Example:
<figure> <img scr=""> <figcaption>Some image from an image source.</figcaption> </figure>
โค <figure>
- It represents the content within itself, which optionally contain a
<figcaption>
tag. - Example:
<figure> <img scr=""> </figure>
โค <hr>
- This element represents a theme-based break between paragraphs.
- Example:
HTML
<p>This is para1</p> <hr> <p>This is para2</p>
CSS
.hr{ text-align: center; } .hr:after{ content: '#' }
โค <li>
- It represents an item in a list.
- It is followed by its parent element
<ol>
,<ul>
or<menu>
- Example:
<ul> <li>Item1</li> <li>Item2</li> <li>Item3</li> </ul>
โค <ol>
- It represents an ordered list of items.
- Used to represent number wise item list.
- Example:
<ol> <li>Item1</li> <li>Item2</li> <li>Item3></li> </ol>
โค <p>
- It represents a paragraph which is usually a block of text, separated from adjacent text blocks.
Example:
<p>This is paragraph 1 with some text in it.</p> <p>This is paragraph 2 with some text in it.</p>
โค <pre>
- It is used to represent preformatted text which is displayed on the webpage at the exact position as written in the HTML file.
- Example:
<pre> L h a </pre>
โค <ul>
- It represents an unordered list.
- It is used to display items with bullet lists.
- Example:
<ul> <li>Item1</li> <li>Item2</li> <li>Item3</li> </ul>
So that was a brief description of a group of HTML tags that are used to organize a section of elements to be displayed on the webpage.
Hope you like this article/tutorial of my series Random-Coding.
Please read my other articles of this series as well for more cool and fun projects.
I will meet you through my next article soon. Till then, stay connected with me through Twitter and Discord
Keep Coding, keep growing โ๏ธ