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.
</blockquote>

Del Example

It points out why the text was deleted.

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

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>
</p>

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.
  	</q>
	We hope they succeed.
</p>

Browser Support

Element
blockquoteYesYesYesYesYes
delYesYesYesYesYes
insYesYesYesYesYes
qYesYesYesYesYes
Spread the love

Leave a Reply

avatar
  Subscribe  
Notify of