Computer >> Computer tutorials >  >> Programming >> HTML

How to use quotation marks in HTML?


The <q> tag is used to add short quotation marks in HTML. Just keep in mind if the quotation goes for multiple lines, use <blockquote> tag. Browsers usually insert quotation marks around the q element.

You can also use the cite attribute to indicate the source of the quotation in URL form.

How to use quotation marks in HTML?

Example

You can try the following code to add quotation marks in HTML

<!DOCTYPE html>
<html>
   <head>
      <title>HTM q tag</title>
   </head>

   <body>
      <h1>Drupal</h1>
      <p>Drupal Community says,</p>
      <q>Drupal is built on principles like collaboration, globalism, and
         innovation.</q>
   </body>
</html>

Output

How to use quotation marks in HTML?