HTML Formatting | HTML 2020

 HTML Formatting

If you use Word processing you must know about formatting. Formatting is the process to change the layout of the  documents. Word processing provide us many formatting tools such as bold, italic, strick through etc. Similarly HTML provide its users to do such task with coding.

Basic HTML Formatting Elements 

The basic elements use for formatting HTML pages are 
  • Bold
  • Italic 
  • Underline 
  • Strick through 
So we will define these one by one with examples and showing its output. 

Bold 

Bold <b> tag is use to bold the text. It begin with <b> and end with </b>. The text between <b> and </b> will be bold. This tag is use when we needed to bold something in our document. You can use more than one <b> tag.

Example


<html>
<head>
    
    <title>Bold</title>
</head>
<body>
    <p>This is a simple <b>paragraph</b></p>
    
</body>
</html>

Result


This is a  simple paragraph

Italic

The Italic tag is use to make text italic in the document. It begin with <i> and end with </i>. The text between <i> and </i> wilm be italic. You can use more than one <i> tag in the document.

Example 

<html>
<head>
    
    <title>Bold</title>
</head>
<body>
    <p>This is a simple <i>paragraph</i></p>
    
</body>
</html>

Result 


This is a  simple paragraph

Underline

Underline <u> tag is use to underline the selected words. The text between <u> and </u> will be underline. 
Watch the example so you will get the code. 

Example

<html>
<head>
    
    <title>Bold</title>
</head>
<body>
    <p>This is a simple <u>paragraph</u></p>
    
</body>
</html>

Result

This is a  simple paragraph

Strike Through
Strike tag <strike> is use to strike thought text. It will make a line in the text. Strike tag <strike> tag begin with <strike> and end with </strike>. The text between <strike> and </strike> will  be strike.

Example 


<html>
<head>
    
    <title>Bold</title>
</head>
<body>
    <p>This is a simple <strike> paragraph</strike></p>
    
</body>
</html>

Result

This is a  simple paragraph



Comments

Popular posts from this blog

How to create a list group with css

Getting Started with JavaScript

JavaScript fundamentals