<cite> HTML element is used to mark a reference to a creative work, such as a book, a movie, an article, or a song. It is typically used to indicate the title of the work being referenced or cited within a document.
Here’s an example of how to use the
<p> In his famous speech, Martin Luther King Jr. said, "<cite>I have a dream</cite >." </p>
In this example, the
<cite> element is used to mark the title of the speech by Martin Luther King Jr., which is “I have a dream”. The
<cite> element helps indicate that this text represents a specific work being referenced or quoted.
By default, the
<cite> element is rendered in italics, but you can style it using CSS to change its appearance, such as adjusting the font, color, or adding emphasis.
It’s important to note that the
<cite> element should be used when explicitly referencing a creative work within the content of an HTML document. For more general citations or bibliographic information, the
<cite> element may not be the most appropriate choice. In such cases, other elements like
<p> can be used, depending on the specific context and requirements.
In summary, the
<cite> element is used to mark a reference to a creative work, indicating the title of the work being cited or referenced. It helps provide semantic meaning and clarity to the document’s content, especially when citing or referring to external sources or works.