DONATE  
MENU
JAVASCRIPT
HTML
JSON
AJAX

HTML Tutorials

INTRODUCTION

» Introduction to HTML

» PRACTICE IT Editor

» Getting Started

» HTML Example

» HTML Tags

» HTML Elements

» Nesting Tags

» Block & Inline Elements

» HTML Attributes

» HTML Comments

» File Paths

» HTML Entities & Symbols

TAGS/ELEMENTS

» Important Tags

» HTML Headings

» Text Formatting

» HTML Links

» HTML Lists

» HTML Tables

» HTML Images

» HTML Audios

» HTML Videos

» HTML Iframes

» HTML Styles

» HTML Scripts

» Semantic Elements

» HTML Metadata

ATTRIBUTES

» Elements' ID

» Elements' Class

» Elements' Style

» Element's Align

» Element's Height & Width

HTML FORMS

» HTML Forms

» Input Elements

» HTML Textarea

» HTML Select

HTML EXAMPLE

» Login Page

.. » HTML » Tags/elements » Text Formatting
Share Tweet WhatsApp

Text Formatting

Text formatting is the process of displaying a text(s) in a special way and in a specified style so as to give such text(s) some form of importance or recognition in the midst of others. For example, italicizing a text to give it some form of recognition in the midst of others. There are a lot of HTML tags that are used in the basic formatting of text. Some of such are listed below, <b> tag - Bold Text The HTML <b> tag is used for creating bold texts in a webpage.
<p><b>Nigeria</b>, a country in western Africa is considered the most populous black nation on earth.</p>

Copy PRACTICE IT

<strong> tag - Strong Text The HTML <strong> is similar to the <b> since they both make text bold but the difference is that a strong text is accorded some form of special or semantic importance by search engines and some browser. So, use <b> to merely make a text bold and the <strong> to make an important text in a paragraph or group of text bold.
<p>You can easily learn how to code on <strong>stackbeginner.com</strong>.

Copy PRACTICE IT

<u> tag - Underlined Text The HTML <u> tag is used in creating underlined texts in a webpage.
<p><u>This text is underlined.</u></p>

Copy PRACTICE IT

<i> tag - Italic Text The HTML <i> tag is used for italicizing text in a webpage or group of text.
We offer all kinds of web services like <i><br/>
Web hosting<br/>
Web designing<br/>
Website management</i>

Copy PRACTICE IT

<em> tag - Emphasized Text The HTML <em> is used in laying emphasis on a text or group of text. Such text are usually italicized but with semantic importance.
We offer all kinds of web services like <em><br/>
Web hosting<br/>
Web designing<br/>
Website management</em>

Copy PRACTICE IT

<small> tag - Small Text The HTML <small> tag is used in reducing the size of a text from its normal size.
<p>This is a <small>small</small> text</p>

Copy PRACTICE IT

<sup> tag - Superscripted Text The HTML <sup> tag is used for superscripting texts.
<p><b>OUR TRADEMARK</b><sup>TM</sup></p>

Copy PRACTICE IT

<sub> tag - Subscripted Text The HTML <sub> tag is used for subscripting texts. subscripting is the opposite of superscripting.
<p><b>OUR TRADEMARK</b><sub>TM</sub></p>

Copy PRACTICE IT

<mark> tag - Marked Key's Text The HTML <mark> tag is used for marking texts with a yellow background. This helps such text stand out or easily noticeable among others.
<p>This is a <mark>marked</mark> text.</p>

Copy PRACTICE IT

<kbd> tag - Keyboard Text The HTML <kbd> tag is used to style texts denoting computer keyboard keys.
<p>Press <kbd>Ctrl ~ C</kbd> to copy text.

Copy PRACTICE IT

<code> tag - Code Text The HTML <code> tag is the standard syntax tax for displaying codes as text.
<p>
<code>
<?php
echo "Hello World";
?>
</code>
</p>

Copy PRACTICE IT

<ins> tag - Inserted Text The HTML <ins> tag is used accorded importance to texts that were not previously contained in a group of text but recently inserted. Such texts are basically underlined but nevertheless given the semantic importance of newly inserted texts.
<p>Before we modified the document, we never saw the need to insert <ins>The names of board members</ins> into the lists.</p>

Copy PRACTICE IT

<del> tag - Deleted Text The HTML <del> indicates a text that was deleted.
<p>Indians are <del>deleted text previously exists.</del></p>

Copy PRACTICE IT

<pre> tag - Pre - formatted Text The HTML <pre> tag defines a pre - formatted text. A pre - formatted text is a text or group of text rendered just as written in an HTML document with the line breaks, tabs, spaces and others, which are usually formatted by browsers, preserved.
<div>
<p>This is
not a
preformatted text</p>
<p><pre>This is
a
preformatted text</pre></p>
</div>

Copy PRACTICE IT

<q> tag - quote Text The <q> tag enables you to display a quoted text with
According to <q>stackbeginner.com</q> tutorials, the q tag is inline.

Copy PRACTICE IT

NOTE:
  • All text formatting tags are inline elements since they are used on a text or group of text in the midst of others.
<br> tag - Break Line The <br> tag is an empty tag that enables you to break a line of text.
Ada is: <br>Beautiful<br/>Brilliant<br/>Hardworking

Copy PRACTICE IT

<hr> tag - Horizontal Line The <hr> tag is an empty tag that does almost same thing as the <br> but in addition to breaking a line of text, it adds an horizontal line.
Ada is: <hr/>Beautiful<hr/>Brilliant<hr/>Hardworking

Copy PRACTICE IT

SUMMARY
  1. We format texts to accord them some special recognition in the midst of others or in a webpage in general.
  2. We can make texts bold in HTML using the <b> tag, underline with the <u> tag, italicize with the <i> tag and a host of other text formatting tags.
  3. There are basically plenty of tags to format webpages and text in HTML.
  4. The <pre> helps you to display texts just as they were composed in an HTML document.
Take a short quiz on Text Formatting.
Ask a question or tell us if Text Formatting is easy or not.
cent?

Join our 1,090 subscribers to receive tutorials' updates!

  We won't spam your mail box. We hate it.





StackBeginner 2021 © Joseph Omamode