xHTML Questions about tags/elements
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Questions about tags/elements

  1. #1
    Join Date
    Jun 2013
    Location
    English
    Posts
    2

    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?

    Thanks in advance,

  2. #2
    Join Date
    Jun 2013
    Location
    English
    Posts
    2

    Re: Questions about tags/elements

    *I can't edit my post?

    Just to clarify, Duckett explains the reasons for <cite> and <dfn>, but not the purpose.

  3. #3
    Join Date
    Apr 2000
    Location
    Belgium (Europe)
    Posts
    3,652

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center