What is HTML cite Attribute?

HTML, HTML Attributes 0 Comments

The cite attribute used to specify a URL that points to the source document or message or why the text was inserted/changed.

Tag Support

You can use cite attribute with <blockquote>, <del>, <ins>, <q> tags.

Blockquote Example

It points out that the quote is from another source.

<blockquote cite="https://en.wikipedia.org/wiki/HTML">
	HTML elements are the building blocks of HTML pages. With HTML 
  	constructs, images and other objects such as interactive forms may 
  	be embedded into the rendered page. HTML provides a means to create 
  	structured documents by denoting structural semantics for text such 
  	as headings, paragraphs, lists, links, quotes and other items.

Del Example

It points out why the text was deleted.

  <del cite="del_cite.html">This text has been deleted</del>

Ins Example

It points out out why the text was inserted.

<p>This is a text.
	<ins cite="why_inserted.html">This is an inserted text.</ins>

Q Example

It points out the source URL of a quote.

<p>WWF's goal is to:
	<q cite="http://www.wwf.org">
		Build a future where people live in harmony with nature.
	We hope they succeed.

Browser Support

blockquote Yes Yes Yes Yes Yes
del Yes Yes Yes Yes Yes
ins Yes Yes Yes Yes Yes
q Yes Yes Yes Yes Yes

Leave a Reply

Your email address will not be published.