If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Questions about tags/elements

Hi there,

I'm reading Jon Duckett's HTML&CSS book, I'm a student who wants to get into coding. I have just a few questions that I can't find answers for, and I'm hoping that you could help.

What is the purpose of <cite> <dfn>, and the practical difference between <del> and <s>? I understand that <abbr> is used so that the user can highlight the word and see the acronym spelt out, but Duckett doesn't explain the practical differences between the above tags apart from just stating that 'you should do it' - is it just for etticate sake?

Re: Questions about tags/elements

<cite> is intended to be used for defining the title of a work (a movie, book, song, painting or other form of artwork). A created something. (in HTML4 this was for citations)
<dfn> is intended for definitions.

<del> (and it's companion <ins>) are used for defining text that has been deleted/inserted in a document.
<s> denontes strikethrough (formerly) or text that is no longer correct (html5)

both <s> and <del> may have a similar rendering in your browser, but they are semantically different.
while it would be perfectly valid to use css to render <del> as red cursive text. changing <s> to red cursive would be "wrong" (even though every browser will happily do it).
And for various purposes the same if true for many other tags that render similarly but are semantically different.
The right approach to HTML is to avoid using markup to denote how you want something to appear, but rather use semantic tags, and let CSS take care of how things should look.
This is the whole point of CSS afterall, just because YOU think deleted text should look like text with a line through it, doesn't mean everyone on this planet agrees that this is the best way to represent it.

* The Perfect Platform for Game Developers: Android
Developing rich, high performance Android games from the ground up is a daunting task. Intel has provided Android developers with a number of tools that can be leveraged by Android game developers.

* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.