learn how to do formatting in HTML

In this blog we are going to learn about the uses of various html elements which we cab use for font formatting, colors and other basic tags. so lets get started.

so the topics which we are going to cover in this blog are :

  • formatting
  • quotations
  • comments
  • colors

Formatting

HTML formatting is the process of transforming text into a more appealing format. HTML allows us to format text without having to use CSS. HTML has a lot of formatting tags. Text can be bolded, italicized, or underlined with these tags.

  • <b> - Bold text
  • <strong> - Important text
  • <i> - Italic text
  • <em> - Emphasized text
  • <mark> - Marked text
  • <small> - Smaller text
  • <del> - Deleted text
  • <ins> - Inserted text
  • <sub> - Subscript text
  • <sup> - Superscript text

<b> bold

Bold text is defined using the HTML <b> element, which has no special meaning.

<strong> important text

This tag is used to Define important text

<i> and <em> Elements

The HTML <i> element designates a section of text that is written in a different voice or mood. Italics are commonly used to display the information inside.

The HTML <em> element defines emphasized text. The content inside is typically displayed in italic.

<small> and <mark> Elements

The HTML <small> element defines smaller text.

The HTML <mark> element specifies text that should be highlighted or marked.

<del> and <ins> Elements

Text that has been removed from a document is represented by the HTML <del> element. In most cases, browsers will draw a line through the removed text.

A text that has been inserted into a document is defined using the HTML <ins> element. In most cases, browsers will highlight added text.

<sub> and <sup> Elements

Subscript text is defined using the HTML <sub> element. Subscript text is half a character below the usual line, and it’s often in a smaller font. Chemical formulae, such as H2O, can be written in subscript text.

Superscript text is defined using the HTML <sup> element. Superscript text is half a character above the usual line, and it’s often in a smaller font. For footnotes, superscript text, such as WWW[1], can be used.

Quotation and Citation

Citations:

A citation is used to show text in a format that is not the same as the rest of the text. The text within the citation element is often italicised. When quoting an author’s opinions or observations, a citation is usually necessary. An opening <CITE >tag and a closing </CITE> tag define the citation element.

<!DOCTYPE html>
<html>
<head>
<title>HTML Citation Example</title>
</head>
<body>

<img src="img1.jpg" width="150" height="70" alt="citation">
<p><cite>HTML Citation</cite> - This is HTML Citation Example</p>

</body>
</html>

Quotations:

Within quotation marks, the quotation tag is used to quote the content. When you duplicate someone else’s statement in your paper, make sure to utilize quote marks. The quote tag begins with the letter <Q> and ends with the letter </Q>.

<!DOCTYPE html>
<html>
<head>
<title>HTML Quotations Example</title>
</head>
<body>

<p>This is HTML Quotations Tutorial. <br />
Here you will learn about <br />
<q>HTML short quote and long quote</q> <br />
with examples.</p>

</body>
</html>

HTML Comments

Although HTML comments are not visible in the browser, they can aid in the documentation of your HTML source code.

<!- -Write your comments here- ->

Examples:

<!- -This is a comment- ->

<p>This is a paragraph.</p>

<!- -Remember to add more information here- ->

HTML Colors

HTML colors can be supplied using RGB, HEX, HSL, RGBA, or HSLA values, as well as established color names.

<h1 style=”background-color:DodgerBlue;”>Hello World</h1>
<p style=”background-color:Tomato;”>Lorem ipsum…</p>

In HTML and CSS, you may provide 147 colour names and hexadecimal values, with 17 of them being standard colours. Aqua, black, blue, fuchsia, grey, green, lime, maroon, navy, olive, orange, purple, red, silver, teal, white, and yellow are the 17 standard colours. These 147 colours are supported by all browsers.

We have many attributes in the <body> tag such as:

Bg color: determines the color of the page’s background.

Text: can give color to body text.

Alink: give color to the active links or selected link.

link: give color to the link text.

Vlink: assigns a color for visited links, i.e. linked text that has previously been clicked on.

HTML Color Coding Methods

There are three distinct ways to set colors on your web page, as seen below:

Color Name: Color names such as green, blue, and red can be specified explicitly.

Hex code: You can have six-digit code that represents the proportion of red, green, and blue in the color.

Color decimal or percentage values: The rgb( ) attribute is used to provide this value.

hope this blog will be helpful, we will come with another topic in the next blog till then

Keep reading Keep learning!!!!

We make your business smarter and broader through the power of the internet. Researcher | Web developer | Internet of things | AI | www.wakeupcoders.com