Using del and ins Tags to Mark Up Editing on HTML Page
By Stephen Bucaro
As society moves away from printed documents and towards online webpages,
a way is needed to mark deletions and insertions on html pages similar to was done
on paper documents. That's where the del and ins html tags come in.
Deletions are placed withing del opening and closing tags, insertions are placed
within ins opening and closing tags.
Shown below is an example of code using the del and ins tags.
The Engineering department <del>recommends</del>
<ins>requires</ins> that the leads be soldered rather
than crimped.
In the browser, the del tag strikes through the text within, and the ins
tag underlines the text within, as shown below.
The Engineering department recommends requires that
the leads be soldered rather than crimped.
What Happened to the strike and u Tags?
The strike tag does exactly the same thing as the del tag. The
u tag does exactly the same thing as the ins tag. However, both the
strike and u tag were deprecated with HTML 4.0. Deprecated
means their use is not recommended because they may not be supported in future browsers.
Why were the strike and u tag deprecated in preference for the
del and ins tags? Is the W3C (World Wide Web Consortium) attempting
to make all html tags three characters? That's the kind of decisions you get from a
committee. They say a committee of eleven people can accomplish something - if ten
of them don't show up!
Shown below is an example of code using the strike and u tags.
The Engineering department <strike>recommends</strike>
<u>requires</u> that the leads be soldered rather
than crimped.
The Engineering department recommends requires that
the leads be soldered rather than crimped.
The W3C says the strike and u tags are not supported in HTML5.
Well, they may not be supported in the HTML5 specification but the three
main HTML5 compatible web browsers DO support strike and u. Over
the years I've found that new browser versions always support long deprecated
html tags. So if you have documents that would require lots of work to replace strike
and u tgs with del and ins tags, I wouldn't bother.
Prefer to Use CSS For Text Settings
Nowadays CSS (Cascading Style Sheets) is preferred for most text specifications.
Shown below are style rules that can accomplish the same thing as the del
and ins tags, and CSS rules are less likely to be deprecated in the future.
The Engineering department <span style="text-decoration: line-through;">recommends</span>
<span style="text-decoration: underline;">requires</span> that the leads be soldered rather than crimped.
The Engineering department recommends
requires that the leads be
soldered rather than crimped.
More HTML Code: • HTML5 role Attribute • Providing Alternate and Title Text for an Image • How to Make a Table Scroll • Add an Image to a Web Page • Use fieldset to Organize Form Elements • HTML Image Basics • HTML abbr and acronym Tag • How to Troubleshoot an HTML Table • HTML Linking Basics • What is HTML?
|