Some Text Elements in HTML5

Introduction

 
In this article, we will be studying some of the HTML5 tags.
 

1. Span element

 
The span element has no meaning in its own right. We would use it to apply one of the global attributes to a region of content. It is not a new element in HTML5. The span element can be used with the class attribute so that we can target content with a CSS style. Example
  1. <html>  
  2. <head>  
  3.     <title>Span Example</title>  
  4.     <style>  
  5.         .HTML5  
  6.         {  
  7.             border: thick solid blue;  
  8.             padding: 4px;  
  9.         }  
  10.     </style>  
  11. </head>  
  12. <body>  
  13.     Abhijeet likes <span class="HTML5">HTML5 </span>and <span class="HTML5">JavaScript.</span>.  
  14.     <br>  
  15.     <br>  
  16.     <br>  
  17.     <span class="HTML5">Hello Guyz </span>Good <span class="HTML5">Morning</span>.  
  18. </body>  
  19. </html> 
Span element

2. Mark element

 
It is basically used for highlighting the text. In other words, I can say that the mark element is new to HTML5 and represents a span of text that is highlighted due to its relevance in another context. Example
  1. <html>  
  2. <head>  
  3.     <title>Mark Example</title>  
  4. </head>  
  5. <body>  
  6.     Hello Guyz Good Morning..  
  7.     <p>  
  8.         I like  
  9.         <mark>HTML5</mark>  
  10.         and  
  11.         <mark>JavaScript.</mark>  
  12.     </p>  
  13. </body>  
  14. </html>  
Mark element
 

3. Ins element

 
The ins element denotes inserted content. It is also a new element in HTML5. Example
  1. <html>  
  2. <head>  
  3.     <title>Ins Example</title>  
  4. </head>  
  5. <body>  
  6.     Good Morning Guyzz  
  7.     <p>  
  8.         <ins>I can  
  9.             <mark>learn</mark>  
  10.             the  
  11.             <mark>HTML5.</mark>  
  12.         </ins>  
  13.     </p>  
  14. </body>  
  15. </html> 
Ins element

4. Del element

 
We denote text that has been removed from the document using the del element. It is also a new element in HTML5. Example
  1. <html>  
  2. <head>  
  3.     <title>Del Example</title>  
  4. </head>  
  5. <body>  
  6.     Good Morning Guyzz  
  7.     <p>  
  8.         <del>A king  
  9.             <mark>has</mark>  
  10.             no  
  11.             <mark>friend.</mark>  
  12.         </del>  
  13.     </p>  
  14. </body>  
  15. </html>   
Del element
 

Conclusion

 
In this article, we studied some of the HTML5 tags.