Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Correct markup of user profile

  • This topic is empty.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #33457
    TT_Mark
    Member

    How would you go about marking up a user profile for a sports team? I’m working on tweaking a website for a rugby team and they have quite a lot of details on their squad page

    e.g.
    Height: 1.95m
    Weight: 95Kg
    etc
    etc
    etc

    It was initially marked up in paragraphs, with a label tag, however I don’t feel this is syntactically correct.

    Would it be better as a ul, or is there another, even better way to mark this up?

    #83430
    AntonNiklasson
    Participant

      is probably what i would use.

      Then if you want the “Height:” to be bold or something, just put them in spans and style it from there!

      #83432
      TheDoc
      Member

      What about a definition list?


      Height

      1.95m

      Weight

      95kg

      Then, since each label/description is already wrapped in different tags, you’ll be able to style it more effectively.

      #83435
      stevendeeds
      Member

      well, build a spreadsheet, or a table, using divs.

      #83418
      stevendeeds
      Member

      Here’s an example of something similar I did..
      http://burrissports.com/joeystats

      I used tables, but you should build your spreadsheet using css.

      #83415
      TheDoc
      Member

      There’s sort of a debate on how it’s really supposed to be used (at least that’s what I’ve been led to believe).

      Some people seem to also use it as Label:Value(s).

      #83416
      TheDoc
      Member

      From W3 spec:
      “Another application of DL, for example, is for marking up dialogues, with each DT naming a speaker, and each DD containing his or her words.”
      Linky link

      #83404
      wolfcry911
      Participant

      This is most definitely the correct use of a table

      #83395
      jacorre
      Participant

      You could make an argument that the information is tabular and you could use tables. I think a definition list in this instance might be easier to use than an unordered list. It wouldn’t need the additional span tags since you can style the dt tags.

      #83396
      TheDoc
      Member

      While I agree that you could most certainly use a table in this situation, I’d prefer the flexbility of the dl.

    Viewing 10 posts - 1 through 10 (of 10 total)
    • The forum ‘CSS’ is closed to new topics and replies.