![](https://static.wixstatic.com/media/49d9db_8701f7c6fc244920bcd074755c1a0651~mv2.png/v1/fill/w_66,h_24,al_c,q_85,usm_0.66_1.00_0.01,blur_2,enc_auto/49d9db_8701f7c6fc244920bcd074755c1a0651~mv2.png)
What is cite?
The HTML Citation element ( <cite> ) is used to describe a reference to a cited creative work, and must include the title of that work.
Global Attributes
The <cite> tag also supports the Global Attributes in HTML.
Event Attributes
The <cite> tag also supports the Event Attributes in HTML.
Note: A person's name is not the title of a work.
The text in the <cite> element usually renders in italic.
Example:
<html>
<head>
<title>Cite Tag</title>
</head>
<body>
<h2>Example of cite tag</h2>
<img src="harry.jpg" height="150" width="120">
<p>A famous book:
<cite>Harry Potter</cite> Famous Books & Their Authors You Never Knew Were
</p>
</body>
</html>
![](https://static.wixstatic.com/media/49d9db_fb37512f06894f0681dac9edf541adfe~mv2.png/v1/fill/w_87,h_43,al_c,q_85,usm_0.66_1.00_0.01,blur_2,enc_auto/49d9db_fb37512f06894f0681dac9edf541adfe~mv2.png)
In the footer, add a cite element with the text "Information and photos from Wikipedia" where "Wikipedia" is a link to the page "https://en.wikipedia.org/wiki/Bumblebee". dynamically create using javascript
cite.html
<html>
<head>
<title>Cite Tag</title>
<link href="style.css" rel="stylesheet" />
</head>
<body>
<h2>Example of cite tag</h2>
<img src="harry.jpg" height="150" width="120">
<p>A famous book:
<cite>Harry Potter</cite> Famous Books & Their Authors You Never Knew Were
</p>
<footer>
</footer>
<script type="text/javascript" src="script.js"></script>
</body>
</html>
style.css
footer {
clear: both;
text-align: center;
margin: 0;
padding: 1em;
color: #fbf3ea;
background-color: #463b2e;
width: 600px;
}
footer cite {
font-style: normal;
}
footer a {
text-decoration: none;
color: #b8860b;
}
footer a:hover {
text-decoration: underline overline;
}
script.js
let cite = document.createElement("cite");
let anchor = document.createElement("a");
anchor.setAttribute("href", "https://en.wikipedia.org/wiki/Bumblebee");
anchor.innerHTML="Information and photos from Wikipedia";
cite.appendChild(anchor);
document.querySelector("footer").appendChild(cite);
New Output
![](https://static.wixstatic.com/media/49d9db_7497d3cf3d4e491aa0864ea186863007~mv2.png/v1/fill/w_49,h_25,al_c,q_85,usm_0.66_1.00_0.01,blur_2,enc_auto/49d9db_7497d3cf3d4e491aa0864ea186863007~mv2.png)
Contact us for this HTML/Javascript assignment Solutions by Codersarts Specialist who can help you mentor and guide for such HTML/Javascript assignments.
If you have project or assignment files, You can send at contact@codersarts.com directly