SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Hybrid View

  1. #1
    SitePoint Zealot barleytwist's Avatar
    Join Date
    Dec 2005
    Location
    Lulworth, Dorset, UK
    Posts
    183
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Coding a page of Weblinks

    I have a Joomla! site and the Weblinks page (a page listing external sites and a short description of that site) uses a table structure. I am not convinced this is the best way as all we need is say a heading (h2) and then a decsriptive para. The heading is the link to the external site.

    Would anyone comment on the best accessible way to show these (i.e. is there an accepted way of doing this as I think tables are for data)?

  2. #2
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,495
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It sounds like a definition list may be in order. The "defining" term could be the link, and then the "definition" could be the description. Well, it would be if you were using HTML 5.

    With HTML 4.01 and XHTML 1.0, you'll be best off with an unordered list that contains a heading and a paragraph for the link and description.

  3. #3
    SitePoint Zealot barleytwist's Avatar
    Join Date
    Dec 2005
    Location
    Lulworth, Dorset, UK
    Posts
    183
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I did wonder about the list but where would the h2 go?

    Are you suggesting ul, li <a> for each link and then <p> for the description?

    Surely h2 <a> (or would it be <a> h2), p repeated each time is more realistic?

  4. #4
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,495
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This.

    HTML Code:
    <li>
        <h2><a href="#">Link text</a></h2>
        <p>Descriptive text.</p>
    </li>

  5. #5
    SitePoint Wizard bronze trophy C. Ankerstjerne's Avatar
    Join Date
    Jan 2004
    Location
    The Kingdom of Denmark
    Posts
    2,692
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Semantically, there is nothing wrong with using a definition list in HTML 4.01 either. The HTML 4.01 specification allows the use of definition lists for other purposes that just defining terms.
    Christian Ankerstjerne
    <p<strong<abbr/HTML/ 4 teh win</>
    <>In Soviet Russia, website codes you!

  6. #6
    Follow: @AlexDawsonUK silver trophybronze trophy AlexDawson's Avatar
    Join Date
    Feb 2009
    Location
    England, UK
    Posts
    8,111
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    I agree with the definition list syntax, It makes a lot more semantic sense.

    Code HTML4Strict:
    <dl>
        <dt><a href="#">Link text</a></dt>
        <dd>Descriptive text.</dd>
    </dl>


Bookmarks

Posting Permissions

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