HTML

[HTML] HTML/q, blockquote/quote

OOQ 2022. 8. 4. 09:44
728x90
SMALL

#HTML

#q, blockquote/quote

q, blockquote

Tags that indicate a quote are q and blockquote. q is an inline element and blockquote is a block element.

Grammar

<q cite="xxx">...</q>
<blockquote cite="xxx">...</blockquote>

The source of the citation is represented by the cite attribute. Entering the cite attribute is optional and not visible in web browsers.

 

example 1

The basic form of the q element is to enclose the quoted phrase in double quotes.

<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>HTML</title>
  </head>
  <body>
    <p>
      Lorem ipsum dolor sit amet
      <q cite="https://www.codingfactory.net/">consectetur adipiscing</q>
      elit.
    </p>
  </body>
</html>

example 2

The basic shape of the blockquote element is that it has white space on both sides.

<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>HTML</title>
  </head>
  <body>
    <p>blockquote</p>
    <blockquote>
      <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean nec mollis nulla.</p>
    </blockquote>
  </body>
</html>
728x90
LIST