HTML Tutorial

HTML Tag: <cite>

What is <cite>?

The <cite> tag is used to identify the title of a work, such as a book, article, or website. It provides information about the source of a quoted or referenced text.

How to Use <cite>

1. Opening and Closing Tags:

  • Use the <cite> tag to open the citation and </cite> to close it.
  • Example: <cite>...</cite>

2. Content:

  • Place the title of the work within the <cite> tags.
  • Example: <cite>The Great Gatsby</cite>

Attributes of <cite>

  • title: Optional attribute that provides a tooltip with additional information about the work.

Examples with <cite>

Example 1:

<p>As Fitzgerald writes in <cite>The Great Gatsby</cite>, "So we beat on, boats against the current, borne back ceaselessly into the past."</p>

Example 2:

<article>
  <h1>Research on Accessibility</h1>
  <p>In the article <cite title="Accessibility in Web Design">Making the Web Accessible</cite>, the author discusses the importance of accessibility.</p>
</article>

Exploring the <cite> Tag: A Simple HTML Example

<!DOCTYPE html>
<html>
<body>

<p>The quote "Live long and prosper" is from the TV show <cite>Star Trek</cite>.</p>

</body>
</html>