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>
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
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
Comments