Quote:
Originally Posted by WV-Mike
Other than a list, how would this be accomplished with CSS?
|
You could use css to make ANY tag look like any other tag. However, the point of using the correct tag is so that your document is using the correct semantic markup. This helps automated devices (and some weird humans who look at the coding

) parse the document properly.
For example, I used the following css on a style sheet to make a list of paragraphs look just like the unordered list. (see attachment)
Code:
/* list-style-type Formal syntax: disc | circle | square | decimal |
decimal-leading-zero | lower-roman | upper-roman | lower-greek |
lower-latin | upper-latin | armenian | georgian | lower-alpha |
upper-alpha | none */
ol {margin:.5em; list-style-type:upper-roman}
ul {margin:.5em; list-style-type:none}
li {margin:0 0 .5em}
div.list {margin:1em 2em}
div.list p {margin:0 0 .5em; text-indent: 0}
One of the main benefits of using a css sheet is that I only have to change/update/fix the styling in one location and it is applied throughout the document...much faster!
If I wanted to add a list style I could change 'none' to 'disc' on the css file to update all the <ul>s at once, but I'd have to manually add the disc symbol to every paragraph if I used the <div>. (
note: there is a way to automatically add the disc image in front of the <p> in each <div> using css but that is beyond the scope of the question and the OP's experience level.)