- This topic is empty.
Viewing 10 posts - 1 through 10 (of 10 total)
Viewing 10 posts - 1 through 10 (of 10 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
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?
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!
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.
well, build a spreadsheet, or a table, using divs.
Here’s an example of something similar I did..
http://burrissports.com/joeystats
I used tables, but you should build your spreadsheet using css.
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).
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
This is most definitely the correct use of a table
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.
While I agree that you could most certainly use a table in this situation, I’d prefer the flexbility of the dl.