![]() |
The Terry Pratchett Unseen Message Board welcomes visitors to the Discworld, Terry Pratchett Novels and literary enthusiasts. |
| |||||||||
|
||||
|
Quote:
|
|
||||
|
Quote:
|
|
||||
|
Quote:
Compare: [code:1] <div class="menuheading">Menu</div> <div class="menu"> <div class="menuitem"> <a href="bathroom.htm">Bathroom</a> </div> <div class="menuitem"> <a href="kitchen.htm">Kitchen</a> </div> <div class="menuitem"> <a href="bedroom.htm">Bedroom</a> </div> </div> [/code:1] With: [code:1] <h1 id="menuheading">Menu</h1> <ul id="menu"> <li class="menuitem"> <a href="cat.htm">Cat</a> </li> <li class="menuitem"> <a href="dog.htm">Dog</a> </li> <li class="menuitem"> <a href="platypus.htm">Platypus</a> </li> </ul> [/code:1] Far too often I see markup similar to the first example. CSS will let you style both markups in exactly the same way, there is nothing you can do with the first example that you can't do with the second example. So why do we prefer the second example to the first example? Because browsers not supporting CSS would be able to render the lists and headings so that they actually make sense to the reader, instead of confusing blocks of text, all styled the same way. I built our company website with this in mind (I admit I used two or three divs in places where it was necessary), and one of the advantages is that it will degrade beautifully to mobile devices (as long as they support xhtml, of course), where heavy graphical designs are not as important as quick access to the true content. Edit: fixed broken markup in the code examples. |
|
||||
|
That is of course true, but then anything used too much or in the wrong place is a pain in the back side... I have seen people use h3 titles for most of their text with the thing redesigned in the CSS and then use a span to define the titles, which structurally is dead stupid.
If you don't know it, there's a great site for CSS design here, I found it quite inspiring... But let us return to the thread at hand... In fact, just for that, I'll be Thread-Hijacking Swedish Pirates today ![]() |
|
||||
|
Quote:
This morning, I was wet-snow-in-the-middle-of-April-when-it's-been-10-degrees-for-weeks-and-you-thought-the-winter-was-finally-over. But now, I'm locksmiths-who-can't-bloody-copy-a-key-right-when-you-need-to-travel-20-km-to-test-if-the-key-works. |
|
||||
|
Quote:
![]() |
|
|||
|
Quote:
People-Who-Add-Me-On-YIM-Or-AIM-And-Ask-For-Help-On-The-Various-Games-I-Go-On *thinks about time taken to type each one* nah, first one is shorter and faster to type |
|
||||
|
Quote:
Also, in defence of my compatriots, at least we know how to spell "colleague'. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|