the <cite> html tagWebsites by Mark - 7 Woodrush gardens, Carterton, Oxfordshire. OX18 1JE

the <cite> html tag
the <cite> html tag

The <cite> html tag

Overview

The <cite> HTML tag is known as a phrase tag, it is mainly used to style text. By default it displays text as italic which is ideal for showing a quotation or citation. It works equally as well in table based layouts as well as CSS based ones. As with all phrase based HTML tags it can be used in situations where consistancy between browsers is difficalt to acheive in other ways. When text is put between the opening and closing <cite> tag it is displayed as a citation text.

Basic Usage

<cite>Some citation text in here</cite>
Any text between the opening and closing tag will be displayed as citation text.

Advance Usage

It is possible to style and add functionality to the <cite> tag, this is done by adding an attribute to after the cite in the opening <cite> tag
Attributes allowed for the <cite>tag include :-class, dir, id, lang, style and title.
In most cases class and id are used and its basic usage is shown below
<cite id=”header”>Some citation text</cite>
With all attributes there is a space after the initial cite then the attribute name, then an equal’s sign and the identifier of the attribute in double quotes.
Both id and class attributes refer to CSS styling of the element and is either stored in the <head> of the webpage on in an external file.
With id this usually refers to a single instance on a page where as class usually refers to a repeating element on a page, it is for this reason for the <cite> tag may use either the id or class as an atribute.
The attribute style allows you to include css style information for a single <cite> tag.
The dir attribute allows for left reading and right reading text, lang allows you to specify a language for the tag and title allows you to include extra information for a tag.
It is possible to attach scripts to tags, as well adding functionality to a webpage, these scripts tend to be written in Javascript and therefore outside the scope of this document

Examples

<cite>Some citation text</cite> – basic usage example.
<cite id=”header>Some citation text</cite> – citation text which is styled by the id header.
<cite class=”headerclass”> Some citation text </cite> – citation text which is styled by the class headerclass.
<cite id =”header” class=”headerclass”> Some citation text </cite> – citation text which is styled by the class headerclass and the id header.
<cite style="color:#F00">Some citation text</cite> – citation text which has a custom colour of red.
<cite dir="rtl">Some citation text</cite> – citation text where the text reads from right to left.
<cite lang="uk">Some citation text</cite> – citation text where the language has been tagged as UK.
<cite title="ptitle">Some citation text</cite> – citation text where the tag has been titled ptitle.

Final Thoughts

Touching on just the surface of the <cite> HTML tag it is easy to see how versatile it is. To take full advantage of it an understanding of CSS is an advantage.

Our blog

Some random stories from our blog.

Mentions on social sites

Overview In the last ten years there has been a vital social change in the form of social networks. First started as a way to connect people, they have changed to include such things as social gaming and more recently have been seen as trusted and rapid sources of news. Google now treats links from these sources as a gauge of popularity and as such should not be ignored with regards to search engine optimisation. The importance of mentions on social sites The importance Google and to some extent other search engines put in these social signals is due to the wide acceptance of social media in general. Due to the sheer scale of membership of these social networks means if a proportion of the network tweets or mentions a story, search engines like Google can take the story as not only being serious but because a large proportion of…

The <p> html tag

Overview In simple terms the <p> HTML tag stands for paragraph. When text is put between the opening and closing <p> tag it is displayed as a paragraph. It is for this reason when you view most of the body copy in the source of a webpage you will see it sitting between <p></p> Basic Usage  <p>Some text in here</p> Any text between the opening and closing tag will be displayed as a paragraph. Advance Usage It is possible to style and add functionality to the <p> tag, this is done by adding an attribute to after the p in the opening <p> tag Attributes allowed for the <p>tag include :-class, dir, id, lang, style and title. In most cases class and id are used and its basic usage is shown below <p id=”header”>Some text</p> With all attributes there is a space after the initial p then the attribute name,…

Keyword use in domain name

Overview Exact Domain Matching has hit the headlines recently as Google has tried to crack down on this latest trick spammers use to bend the Google search results. Although Exact Domain Matching may now not work as it once did, domains which feature a close match still work and it could be argued that a close match can now take the place where Exact matches once stood. The importance of keywords in the domain name Originally it took a lot of money, time and effort to create a website. During this period people who had invested in a domain name which matched what they did was seen to have benefits and reinforce the likely content a website would have. In short the domain name could give Google a good ranking signal. Over the last decade the cost of publishing to the web has dropped drastically and for little or no…

The <i> html tag

Overview Italic text in HTML can be acheived using the <i> tag. The <i> tag is one of the original ways to format text and more recently CSS and other tags have reduced the importance of this tag. It is still a good tag when used correctly. When text is put between the opening and closing <i> tag it is displayed as italic text. The <i> tag can be used multiple times on a webpage and can be nested inside other tags for dramatic effect. Care should be taken when using this tag as italic text can be hard to read, especially at small text sizes. Basic Usage <i>Some italic text</i> Any text between the opening and closing tag will be displayed as a large heading. Advance Usage It is possible to style and add functionality to the <i> tag, this is done by adding an attribute to after the…

Apple to buy Google

In a shock announcement Apple has bought a controlling share in the Internet giant Google. Apple has cited its reason behind the purchase ‘To expand from the digital desktop to a centric focused digital lifestyle’. Also in its announcement, were plans ‘within a reasonable timescale’ to phase out Google Checkout with all services being transferred to its ‘ITunes Store’. There is some speculation that the Store will now face some re positioning due to Apples new focus. Where does this leave web users and competing companies like Microsoft. Safari, Apples flagship web browser is due for a major upgrade in the Q3 this year, with the introduction of its I-Game and I-See Safari Web based plug-ins. Both these Safari only plug-ins will integrate game and music content direct into the safari browser for a totally seamless entertainment experience. People not using Safari will not have access to this killer functionality,…

© 2011 Websites by Mark. Do not reproduce any part of this website without permission.
Email : mark@websitesbymark.co.uk - Phone : 07716 447228 / 01993 820005
Postal Address : 7 Woodrush Gardens, Carterton, Oxfordshire. OX18 1JE