Skip to content
Related Articles

Related Articles

How to define a thematic change in the content in HTML5?
  • Last Updated : 17 Mar, 2021

In this article, we will see how to define a thematic change in the content of a page. This can help to introduce a break in between paragraphs when the description of the paragraph changes.

The <hr> element in HTML is used to represent a thematic change in the content. It can be used with attributes like align, shade, width and size to specify its features. It is a self-closing tag.

The below examples show the use of the <hr> tag to mark a thematic change between paragraphs:

Example 1:

HTML




<!DOCTYPE html>
<html>
<body>
    <h2>HTML</h2>
      
    <p>Hypertext Markup Language is the markup 
      language for pages to be displayed in a web 
      browser. It can be used with CSS to improve 
      the look of the webpage and JavaScript to make 
      the page dynamic.</p>
  
  
    <!-- Introducing a thematic break here -->
    <hr>
  
    <h2>CSS</h2>
      
    <p>Cascading Style Sheets is a language that is 
      used for styling a webpage in accordance to 
      the given HTML content.</p>
  
</body>
</html>

Output:



Example 2:

HTML




<!DOCTYPE html>
<html>
<body>
    <h2>Stack</h2>
      
    <p>A Stack is a data structure that follows
      the Last In First Out order to store the 
      data.</p>
  
      
    <!-- Normal HR element -->
    <hr>
  
    <h2>Queue</h2>
    <p>A Queue is a data structure that follows 
      the First In First Out (FIFO) order to 
      store data.</p>
  
  
    <!-- HR element with the size 
    and width modified -->
    <hr size="10" width="500">
  
    <h2>Heap</h2>
      
    <p>A Heap is a tree-based data structure that 
       can be used for implementing priority queues.</p>
  
          
    <!-- HR element with the alignment 
    and width modified -->
    <hr align="right" width="300">
</body>
</html>

Output:

My Personal Notes arrow_drop_up
Recommended Articles
Page :