The <cite> tag in HTML is used to set the title of work. This can be title of a movie, title of a song, title of a painting, etc.
Let us now see an example to implement the cite tag in HTML −
Example
<!DOCTYPE html> <html> <body> <h1>Books</h1> <h2>Java</h2> <p>Refer the following books to learn Core Java:</p> <p><cite>Core Java: An Integrated Approach</cite> by R. Nageswara Rao.</p> <p><cite>Java - The Complete Reference</cite> by Herbert Schildt.</p> <h2>AngularJS</h2> <p>Refer the following books to learn AngularJS:</p> <p><cite>Pro AngularJS</cite> by Adam Freeman</p> <p><cite>Learning AngularJS: A Guide to AngularJS Development</cite> by Ken Williamson</p> </body> </html>
Output
In the above example, we have set the title of work using the cite tag −
<h2>Java</h2> <p>Refer the following books to learn Core Java:</p> <p><cite>Core Java: An Integrated Approach</cite> by R. Nageswara Rao.</p> <p><cite>Java - The Complete Reference</cite> by Herbert Schildt.</p>
As you can see the title of the book is set using the <cite> −
<cite>Core Java: An Integrated Approach</cite> by R. Nageswara Rao