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

the <strike> html tag
the <strike> html tag

The <strike> html tag

Overview

The <strike> HTML tag is mainly used to style text. By default it displays text as with a strikethrough line through it which is ideal for showing corrections or previous amended text. 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 <strike> tag it is displayed as a strikethrough text.

Basic Usage

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

Advance Usage

It is possible to style and add functionality to the <strike> tag, this is done by adding an attribute to after the strike in the opening <strike> tag
Attributes allowed for the <strike>tag include :-class, dir, id, lang, style and title.
In most cases class and id are used and its basic usage is shown below
<strike id=”header”>Some strikethrough text</strike>
With all attributes there is a space after the initial strike 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 <strike> tag may use either the id or class as an atribute.
The attribute style allows you to include css style information for a single <strike> 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

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

Final Thoughts

Touching on just the surface of the <strike> 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.

Newspapers are dead – long live the living story

Google recently gave the world a glimpse of where it sees news going in the future. With Living Stories, has Google unleashed the start of Minority Report style newspapers, or is there danger of good news reporting dying? Electronic paper, just add batteries Electronic paper and readers have been available for a while now and currently offer the user the chance to view copy electronically, where these devices differ from Smart Phones and computers, are their ability to be a user comfortable format, and in addition use very little in the way of power, making them the ideal replacement for a commuters book or newspaper. On the horizon are thinner, paper like readers, that have colour displays and will have the ability to show video, giving the user a truly sci-fi like experience. Personalised news and content for the masses Google have not been backwards with realising the idea of…

Keyword use in IMG ALT attributes

Overview The original HTML standard has always been geared with the idea of linking text documents together, but even from the earliest days there has been support for displaying images. In the starting days of the internet effective download speed were very slow and even pages containing text may take many seconds to display. When people started using images download times increased drastically and often the browsers allowed you to ‘turn off images’. For web pages that realised on graphics to be usable, this presented a real issue. Fortunately images had always had the ability to contain a text description about what the image was about. Now known as the IMG ALT tag it’s not only used for the above instances, but also is now a great component in making web pages accessible to users with a visual impairment. In addition because search engines like Google cannot see images, they…

Pop goes the Google

With Google’s recent decision to remove categories like SEO from its local business listings, is this the beginnings of Google’s vision of the web, or a first step that will ultimately reduce Google impact on the world? Googletastic Google has always promised internet nirvana by the lure of free web based services and applications, but in recent time this free lunch has always been accompanied by an expensive hangover. When Google offered the chance for all websites to be listed on their monolith of a search engine, they unleashed the horde known as SEO, which ultimately ensured either website owners employing the services of specialised companies to promote websites or for companies to go through hoops to do the same. Even today SEO can be a lucrative revenue stream for those companies who offer that service. Every time Google release an update to its search engine, there is ‘gold rush…

The <code> html tag

Overview The <code> HTML tag is known as a phrase tag, it is mainly used to style text. By default it displays text in a fixed width font which is ideal for displaying samples of programming code. 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 <code> tag it is displayed as a code text. Basic Usage <code>Some code text in here</code> Any text between the opening and closing tag will be displayed as a code text. Advance Usage It is possible to style and add functionality to the <code> tag, this is done by adding an attribute to after the p in the opening <code> tag Attributes allowed for the…

Taking over the Internet one site at a time

For many years the traditional way of making sure your website was seen all over the world was to make sure your site ranked well on Google. By use of Back links, Page Rank and SEO, this set of techniques has become a black art known to a few gurus. With the introduction of Google Caffeine update is this about to change? How it started In 1998, the year Google was founded no-one could have predicted the growth of the internet and the importance of companies like Google to all our lives. Within a short period of time Google had indexed vast quantities of information and companies began to see the value of being included in the Google search results. With so many websites listed, it became vital if you wanted to have visitors, you had to be listed on Google front page. From this moment the term SEO or…

© 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