How to define a thematic change in the content in HTML5?
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.
Example 1: The below example shows the use of the <hr> tag to mark a thematic change between paragraphs:
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 >
< 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: In this example, we will use tags for defining a thematic change.
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 >
< 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 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 align = "right" width = "300" >
</ body >
</ html >
|
Output:
Last Updated :
06 Jun, 2023
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...