HTML | Text Formatting

HTML | Text Formatting


If you use an MS Word or another editor, you will be familiar with the ability to bold, italic or underline the text; We use HTML Formatting Elements to see how text is displayed in HTML and XHTML.
Let me tell you about HTML Formatting Elements .

HTML Text Formatting

HTML formatting elements
I've told you about the HTML style feature.

With the special meaning of HTML always defining the text, it also has to define the special type of element.

HTML formatting uses elements such as bold text or italic text for most outputs <b> and <i>.

Text formatting elements .


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




Html <i> element
By HTML <i> element, we define italic text.
Example



<html> 
<head>           ...... </head> 
<body>  
<i>This text is italic</i>      
</body> 
</html>


Result
This text is italic


Html <small> element
The <small> element in HTML illustrates the small text:
 Example

<html> 
<head>           ...... </head>        
<body> 
 <h2>HTML <small>Small</small> Formatting</h2>
</body> 
</html>


Result
HTML Small Formatting


Html <mark> element
The <mark> element in HTML displays the marked or highlighted text:
  Example

<html> 
<head>           ...... </head>        
<body> 
 <h2>HTML <mark>Marked</mark> Formatting</h2>
</body> 
</html>


Result
HTML Marked Formatting


Html <Del>  element
<Del> element in HTML exposes deleted (deleted) text.
Example



<html> 
<head>           ...... </head>        
<body> 
 <p>My favorite color is <del>blue</del> red.</p>
</body> 
</html>


Result
My favorite color is blue red.


Html <ins> element
The text inserted in the <ins> element displays (Added) text.
Example



<html> 
<head>           ...... </head>        
<body> 
 <p>My favorite <ins>color</ins> is red.</p>
</body> 
</html>


Result
My favorite color is red.


Html  <sub> element
The <sub> element in HTML illustrates the subscripted text.
Example



<html> 
<head>           ...... </head>        
<body> 
 <p>This is <sub>subscripted</sub> text.</p>
</body> 
</html>


Result
This is subscripted
Html <sup> element
The <sup> element in HTML displays the superscripted text.
Example



<html> 
<head>           ...... </head>        
<body> 
 <p>This is <sup>superscripted</sup> text.</p>  
</body>
 </html>

HTML | Text Formatting If you use an MS Word or another editor, you will be familiar with the ability to bold, italic or underline the text; We use HTML Formatting Elements to see how text is displayed in HTML and XHTML. Let me tell you about HTML Formatting Elements .

Post a Comment

[blogger]

MKRdezign

Contact Form

Name

Email *

Message *

Powered by Blogger.
Javascript DisablePlease Enable Javascript To See All Widget