On a website I’m creating I’m displaying some tags for each news entry.
Now there are two ways to display the tags: simply using a string tag1, tag2, tag3 or putting them in a list <ul><li>tag1</li><li>tag2</li><li>tag3</li></ul>.
Of course I would style this list so it looks exactly like the plain string: http://jsfiddle.net/ThiefMaster/YKFH5/
My question is now: Which of these methods would you use and why? From what I know the necessary CSS for the list method is widely supported and in older browsers the only thing missing would be the commas.
It depends on what you’re trying to accomplish. If you just want to list the items, there’s nothing wrong with your first method, just listing the text out. The reason to go the other route would be if you want to style each item, or for some other reason separate them for clicking, hovering, etc…
Demo with hover effect: http://jsfiddle.net/Jaybles/YKFH5/3/