attributes vs styles vs ?
| From: | Daniel Convissor | Date: | Sat, 15 May 2004 15:35:17 +0000 |
| Subject: | attributes vs styles vs ? | ||
| Groups: | php.pear.webmaster | ||
| Request: | Send a blank email to pear-webmaster+get-2326@lists.php.net to get a copy of this message | ||
Hi Folks:
I hope we can have a discussion about standardizing an aspect of our HTML
coding practices. Things have been gradually moving from using simple
attributes (like align, border, valign) to compounding them into style
attributes.
Example:
<th align="left">Version</th>
Compared to:
<th style="text-align: left;">Downloads</th>
I'm curious what people see as the beneifts and pitfalls for this, and
perhaps we can reach an agreement on which method to use.
I recall some commit messages mentioning XHTML compliance earlier. Both
versions are valid XHTML.
I see several disadvantages...
It makes the HTML longer, harder to read and reduces portability (no I
can't spout off which browsers it doesnt work with, sorry), all without
really changing how the page is rendered in modern browsers anyway.
Also, I imagine a style set directly in an element will override styles
set by a style sheet. It's handy to be able to set things using HTML
attributes for older browsers and then override them via a style sheet for
newer ones. Let alone, controlling via a style sheet allows for easier
long term site-wide maintenance.
Thanks for your consideration,
--Dan
--
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
data intensive web and database programming
http://www.AnalysisAndSolutions.com/
4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409