Friday, July 26, 2024

HTML Quotations

HTML quotations are used to indicate quoted text and can be displayed inline or as block elements. The <q> tag defines a short inline quotation, while the <blockquote> tag is used for longer block-level quotations. Both tags often include the cite attribute to reference the source of the quote. Proper use of quotation tags helps distinguish quoted content from the main text, enhancing readability and credibility.

Examples:

<p>He said, <q>HTML is the standard markup language for creating web pages.</q></p>

<blockquote cite="https://www.example.com">

HTML stands for HyperText Markup Language. It is used to create web pages and web applications.

</blockquote>


HTML Code:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>HTML Tutorial</title>
</head>
<body>
    <h1>HTML Quotations</h1>
    <p>HTML offers different elements for quotations and citations.</p>
    <p>He said, <q>HTML is the standard markup language for creating web pages.</q></p>
    
    <blockquote cite="https://www.example.com">
      HTML stands for HyperText Markup Language. It is used to create web pages and web applications.
    </blockquote>

</body>
</html>

The Output of the above code:


HTML Tutorial

HTML Quotations

HTML offers different elements for quotations and citations.

He said, HTML is the standard markup language for creating web pages.

HTML stands for HyperText Markup Language. It is used to create web pages and web applications.