Introduction
A Cite tag is used to represent the title of a work. In other words, the cite tag indicates a citation from a paper, essay, book, a score, a song, a script, a film, TV show, sculpture, a painting, a musical, a play, an opera, etc. Usually, the text in a cite is rendered by the browser using an italic font style. It can be used by itself, or along with one of the quote tags <q> and <blockquote>.
Syntax
<cite
class=specifies class names
id= unique identity
lang=specifiy language code
style= information about style
title=Specify title > Use text here
</cite>
|
Attributes Introduced by HTML5
|
| accesskey |
| contenteditable |
| contextmenu |
| data-X |
| draggable |
| hidden |
| itemid |
| itemprop |
| itemref |
| itemscope |
| itemtype |
| spellcheck |
| tabindex |
|
HTML5 Event Attributes
|
| onabort |
onblur |
oncanplay |
oncanplaythrough |
| onchange |
onclick |
oncontextmenu |
ondblclick |
| ondrag |
ondragend |
ondragenter |
ondragleave |
| ondragover |
ondragstart |
ondrop |
ondurationchange |
| onemptied |
onended |
onerror |
onfocus |
| onformchange |
onforminput |
oninput |
oninvalid |
| onkeydown |
onkeypress |
onkeyup |
onload |
| onloadeddata |
onloadedmetadata |
onloadstart |
onmousedown |
| onmousemove |
onmouseout |
onmouseover |
onmouseup |
| onmousewheel |
onpause |
onplay |
onplaying |
| onprogress |
onratechange |
onreadystatechange |
onscroll |
| onseeked |
onseeking |
onselect |
onshow |
| onstalled |
onsubmit |
onsuspend |
ontimeupdate |
| onvolumechange |
onwaiting |
|
|
Code :
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html
- xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title></title>
- </head>
- <body>
- <p>
- This is an example of
- <cite>cite tag </cite>in HTML5.
- </p>
- <p>
- This is an example of
- <cite title="Example of cite tag in html 5">cite tag </cite>
- in HTML5.
- </p>
- <p>
- This is an example of
- <cite title="Example of cite tag in html 5" style="color: Red">
- cite tag </cite>in HTML5.
- </p>
- </body>
- /html>
Output
Internet Explorer
Chrome
FireFox
Safari