HTML stands for HyperText Markup Language
which is the standard markup language for creating webpages. It uses a combination of markup tags and attributes to define the structure and layout of a webpage
as well as to add various kinds of content such as text
images
videos
and links.
In this article
we will discuss some of the important formatting elements and techniques used in HTML.
HTML provides six levels of headings
denoted by the <h1>
to <h6>
tags. The <h1>
tag represents the highest level (the main heading) and the <h6>
tag represents the lowest level (the least important heading).
The <p>
tag is used to define a paragraph. The browser automatically adds some space above and below paragraphs to visually separate them from other elements on the page.
HTML provides several tags for formatting text
such as:
<b>
- Bold text
<i>
- Italic text
<u>
- Underlined text
<strong>
- Strongly emphasized text
<em>
- Emphasized text
<mark>
- Marked text
<del>
- Deleted text
<ins>
- Inserted text
<sub>
- Subscript text
<sup>
- Superscript text
HTML supports ordered (numbered) and unordered (bullet) lists using the <ol>
and <ul>
tags
respectively. Each list item is defined using the <li>
tag.
HTML allows you to create hyperlinks using the <a>
tag. The <a>
tag requires two attributes: href
(the URL of the link) and target
(the target window or frame where the link will open).
To display images on a webpage
you can use the <img>
tag. The <img>
tag requires the src
attribute (the URL of the image file) and optionally
the alt
attribute (alternative text to be displayed if the image cannot be loaded).
You can create tables in HTML using the <table>
<tr>
and <td>
tags. The <table>
tag defines the table
the <tr>
tag defines a row
and the <td>
tag defines a cell.
HTML provides a range of form elements like input fields
checkboxes
radio buttons
dropdown menus
and buttons. These form elements are wrapped in a <form>
tag and utilize various attributes to control their behavior and appearance.
HTML offers numerous formatting options to create visually appealing and interactive webpages. It is essential to have a good understanding of HTML formatting elements in order to create well-designed and accessible websites.