HTML Preformatted & Horizontal Rule Tags in Hindi / Urdu A Detailed Tutorial:
HTML <pre> Tag
To display preformatted text in HTML, you can use the <pre> tag. The <pre> tag is used to preserve whitespace and display text exactly as it appears in the HTML code, including line breaks and spaces.
Here's an example:
In the code above, the text within the <pre> tags will be rendered with the original line breaks and spaces preserved. The text will be displayed in a monospace font by default.The <pre> tag is particularly useful when you want to display code snippets, ASCII art, or any text that requires a fixed-width font and precise formatting.You can also combine the <pre> tag with other HTML elements or CSS to further style or structure the preformatted text.Remember to place the <pre> tags within the appropriate section of your HTML document, such as within the body (<body>) tags.
To learn More About Pre Tage Click Here
HTML <hr> Tag:
To create a horizontal rule (horizontal line) in HTML, you can use the <hr> tag. The <hr> tag is a self-closing tag, meaning it doesn't require a closing tag. It is used to insert a horizontal line to visually separate content within a document. Here's an example:
In the code above, the <hr> tag is used to insert a horizontal line between the two paragraphs. When rendered in a browser, it will display as a horizontal line across the width of the containing element.By default, the horizontal line is displayed with a specific style (e.g., a solid line). However, you can customize its appearance using CSS.It's worth noting that the <hr> tag is a presentational element, and its use has diminished in favor of using CSS to style lines or borders. Nevertheless, it can still be used for quick and simple horizontal line insertion.Remember to place the <hr> tag within the appropriate section of your HTML document, such as within the body (<body>) tags.