Following on from last week, below are some lesser used but still very useful text formatting tags.
Delete and Insert
If you decide to change some information on a page, but what to emphasise that you’ve made an update, perhaps to a blog post or a piece of news, then we use the del and ins tags to do this.
The del tag is used to surround the text to be deleted. Using this tag will usually put a strikethrough the text. The del tag can also accept two attributes, cite, which accepts a URL to a page or document that explains why the text was deleted, and a datetime attribute, that defines the time of where the text was amended.
We then have the ins tag, to insert the new text. This is similar to the del tag as it accepts the same attributes, however it outputs text with an underline.
So, for example, we could have the text of
[sourcecode language="html"]
The BBQ will take place on Saturday 31st July at 2:00pm.
[/sourcecode]
Now we could choose to change the date to a week later, as rain is forecast. To do this we need to do the following:
[sourcecode language="html"]
The BBQ will take place on Saturday 31st July7th August at 2:00pm.
[/sourcecode]
Which would give you:
The BBQ will take place on Saturday 31st July7th August at 2:00pm.
This way, people who have already read the post before can easily see that a change has been made, and when it was updated.
Preformatted Text
Preformatted text perserves the formatting from the HTML document using the pre tag. This is usually output in a fixed width font, such as courier, and keeps the spacing and line breaks. It cannot accept tags such as images or objects. Usage for this tag is
[sourcecode language="html"]
This is some preformatted text hello, how are you there's a large space
[/sourcecode]
Which would give you the output of
This is some preformatted text hello, how are you there's a large space
Sub and Superscript
If you want to create numbered footnotes, perhaps display some mathematics on your site, or display some chemistry formulas, then you need to use the sub and sup tags. Subscript will put the content within the tags to half a character below the baseline, and superscript puts the content to half a character above the baseline. For example, to write out the the chemistry symbol for Carbon Dioxide, we would use
[sourcecode language="html"]CO2[/sourcecode]
Which gives us CO2
Then to write a mathematical equation, we would use superscript eg.
[sourcecode language="html"]4x2 + 2x + 5 = 47[/sourcecode]
Which gives us: 4x2 + 2x + 5 = 47
Writing Addresses
We also have an address tag available for addresses. This can surround an address to signify what it is. This needs to be used in conjunction with the line break tag, to give a typical address like appearance eg.
[sourcecode language="html"]
New Road
New Town
Some City
England
W4 1TX
[/sourcecode]
This will then give us the output as
1, New StreetNew Road
New Town
Some City
England
W4 1TX
Styling
Of course the visual look of these elements can be controlled with the various CSS that we’ve already covered.








I didnt know how to do that strikethrough maneuver. I am going to start using Del tags now. Thanks for the tip.