postImage

Html 5 formating

blogImage

By Emmanuel Chinonso

Web Developer

Last updated: 2 May 2024

HTML 5 Formating

HTML5 is the latest version of the Hypertext Markup Language (HTML), the language used to format the content of a web page. HTML5 is designed to make the formatting of a web page easier and more consistent than ever before.

HTML5 introduces several new tags, such as <header> and <footer>, as well as attributes that make it easier to format content. For example, the new "placeholder" attribute allows a web designer to add a hint about what kind of information should be entered in a particular form field.

In addition to the introduction of new tags and attributes, HTML5 also includes enhanced support for multimedia content. This includes the ability to embed audio, video, and even interactive content directly into the HTML code of a web page. This makes it much easier to create engaging, interactive web pages without the need for complex coding.

In addition to multimedia support, HTML5 also offers several other new features that make formatting web pages easier and more consistent. For example, HTML5 includes a host of new form elements, such as the <datalist> and <meter> tags, which make it easier to create forms that are more user-friendly and accessible.

Here we are going to go through some of the tags

Bold Element

The <b> tag in HTML is used to represent a section of text that is stylistically different from the surrounding text. This tag is generally used to draw attention to a particular section of text and give it some emphasis. For example, you may use the <b> tag to bold the title of a blog post or to emphasize an important sentence in a paragraph.

html
<p>This is a <b>bold</b> example.</p>

Italic Element

The italic tag in HTML is used to define text as italicized or slanted. It is written as text. It is most commonly used when quoting a source or making a reference to a specific word or phrase.

html
<i>This text will be italicized.</i>

Underlined Text Element

Underlined text is a style of text decoration in HTML that adds an underline to text. It is used to indicate emphasis and to make text stand out from the surrounding text. To create underlined text in HTML, use the <u> tag.

html
<p>This text is <u>underlined</u>.</p>

small Text Element

The <small> element is used to define smaller text in HTML documents. It is used to represent side comments, small print, or legal disclaimers. This element is typically used to decrease the font size of the text and make it appear smaller in comparison with the surrounding text.

html
<p>This is an example of a <small>small text</small> inside a paragraph.</p>

Larger Text Element

The <strong> tag in HTML is used to denote a larger text element, usually used to draw attention to a particular word or phrase. This tag is usually rendered as bold text in most browsers.

html
<p>This is a <strong>very important</strong> message.</p>

Superscript Text Element

The Superscript Text Element in HTML is used to format text in a smaller font size and raise it higher than the normal text. It is generally used to denote a footnote, trademark, or a mathematical expression. The <sup> tag is used to denote superscript text.

html
<p>This example uses a superscript text element: 2<sup>2</sup> = 4</p>

The output will be: This example uses a superscript text element: 2² = 4

Subscript Text Element

Subscript text element in HTML is used to create text that appears partially below the baseline of the normal line of text. It is usually used to denote mathematical equations, chemical formulas or variables.

html
<p>This is an example of <sub>subscripted</sub> text.</p>

Insert Text Element

The <ins> element in HTML is used to define an inserted text. It is used to indicate areas of the document that have been added or changed since the last revision.

html
<p>The following words were <ins>added</ins> since the last revision:</p>
<ins>This is an example of added text</ins>

The output of the above code will be:

The following words were added since the last revision:

This is an example of added text

The del tag Element

The <del> tag element in HTML is used to mark deleted text. It is useful for indicating edits in a document or for indicating text that has been removed from a web page. It is also useful for indicating changes in legal documents.

html
<p>This is the original sentence <del>with a deleted word</del>.</p>

Output:

This is the original sentence with a deleted word.

Build modern projects using Bootstrap 5 and Contrast

Trying to create components and pages for a web app or website from scratch while maintaining a modern User interface can be very tedious. This is why we created Contrast, to help drastically reduce the amount of time we spend doing that. so we can focus on building some other aspects of the project.

Contrast Bootstrap PRO consists of a Premium UI Kit Library featuring over 10000+ component variants. Which even comes bundled together with its own admin template comprising of 5 admin dashboards and 23+ additional admin and multipurpose pages for building almost any type of website or web app.
See a demo and learn more about Contrast Bootstrap Pro by clicking here.

Related Posts