Hey! I saw people adding cite element outside the blockquote element in paragraphs. Please tell me can I use cite element inside the blockquote element? Is it semantically correct?
Assignment Link
My Source Code (Codepen)
Hi there @Hakan, and welcome to our community.
Your work here looks really good, and I see no reason why you can’t use <cite>
inside <blockquote>
.
In fact, I went so far as to check your code in the W3C HTML Validator, and it returns no validation errors, so I think you’re all good.
Note: The code I checked was the following, to make sure it has a complete document structure (otherwise the validator does complain):
<!doctype html>
<html lang="en">
<head>
<title>test</title>
</head>
<body>
<h1>Advanced text semantics</h1>
<p>Let's start with a quote:</p>
<blockquote cite="https://developer.mozilla.org/en-US/docs/Learn/Accessibility">
<p>By default, <abbr title="Hypertext Markup Language">HTML</abbr> is accessible, if used correctly.</p> - From <a href="https://developer.mozilla.org/en-US/docs/Learn/Accessibility"><cite>Accessibility Page of MDN</cite>.</a>
</blockquote>
<p><abbr title="Cascading StyleSheet">CSS</abbr> can also be used to make web pages more, or less, accessible.</p>
<p>Chemical Formulae: H<sub>2</sub>0 - (Water), C<sub>2</sub>H<sub>6</sub>O - (Ethanol).</p>
<p>Dates: <time datetime="2019-12-25">December 25<sup>th</sup> 2019</time> (Christmas Day), <time datetime="2019-11-02">November 2<sup>nd</sup> 2019</time> (Día de los Muertos).</p>
</body>
</html>
1 Like