FOLLOW US ON TWITTER



FOLLOW US



img/blogimg/html5.jpg


@coder 813

HTML Marking-up Quotes


2021-11-17 20:03 · 4 min read

Marking-up Quotes in HTML with <q>

The q element can be used for a quote that is part of a sentence: Quotation marks should not be added. User agents should (in HTML 4.01) resp. must (in HTML 4.0) render them automatically.

<p>She wrote <q>The answer is 42.</q> and everyone agreed.</p>

 

Marking-up Quotes in HTML with <q> and <blockquote>

The HTML <q> element indicates that the enclosed text is a short inline quotation. Most modern browsers implement this by surrounding the text in quotation marks. This element is intended for short quotations that don't require paragraph breaks;

<q> is also known as an Inline Quotation element because it is an inline element

Source URL (cite attribute)

The cite attribute can be used to reference the URL of the quoted source:

<p>She wrote <q cite="http://example.com/blog/hello-world">The answer is 42.
</q> and everyone agreed.</p>

Note: that browsers typically don’t show this URL, so if the source is relevant, you should add a hyperlink (an element) in addition.

Block with <blockquote>

The blockquote element can be used for a (block-level) quote:

<blockquote>
<p>The answer is 42.</p>
</blockquote>

 

Source URL (cite attribute) with <blockquote>

The cite attribute can be used to reference the URL of the quoted source:

<blockquote cite="http://example.com/blog/hello-world">
<p>The answer is 42.</p>
</blockquote>

Note that browsers typically don’t show this URL, so if the source is relevant, you should add a hyperlink (an element) in addition (see the section Citation/Attribution about where to place this link)

Citation/Attribution

The citation/attribution should not be part of the blockquote element:

<blockquote cite="http://example.com/blog/hello-world">
<p>The answer is 42.</p>
</blockquote>
<p>Source: <cite><a href="http://example.com/blog/hello-world" rel="external">Hello
World</a></cite></p>

You can add a div element to group the quote and the citation, but it exists no way to associate them semantically.
The Cite element can be used for the reference of the quoted source (but not for the author's name).

The citation/attribution (e.g., the hyperlink giving the source URL) can be inside the blockquote, but in that case, it must be within a cite element (for in-text attributions) or a footer element:

<blockquote cite="http://example.com/blog/hello-world">
<p>The answer is 42.</p>
<footer>
<p>Source: <cite>
<a href="http://example.com/blog/hello-world" rel="external">Hello
World</a></cite></p>
</footer>
</blockquote>
TAGS:






POST COMMENTS
No Comment

Please login to post comment




POPULAR POSTS

best free web hosting services...
what is new in miui 11?...
free website ssl security using cloudfla...
do you want to make money online?...
CSS3 @IMPORT RULES...
What is HTML Anchor Tag and Hyperlinks?...
How to host a web page in 10 minutes....
CSS3 RESPONSIVE UI...
Tables HTML...
CSS3 FUNCTIONS...
How to use CSS3 Overflow Property?...
CSS3 FILTERS...


RECENT COMMENTS

2022-03-05 11:05
By coder on XAMPP - MySQL shutdown unexpectedly | How to fix MySQL crash unexpectedly
2021-10-12 12:34
By abnongoke on do you want to make money online?
2021-10-12 12:34
By abnongoke on how to get a free website domain name?
2021-10-12 12:34
By solar panel for shed on what is new in miui 11?
2021-10-12 12:34
By solar panel for shed on best free web hosting services
2021-10-12 12:34
By amos tanui on free website ssl security using cloudflare


SOCIAL SHARE



FOLLOW US ON TWITTER



FOLLOW US ON FACEBOOK



FOLLOW US







Recent Blogs



Contact Us

Subscribe Our News-Letter



Kashipur, 244713
Uttarakhand, India



© www.prodevskill.com 2023. All Rights Reserved. Powered by Pro Developer