I like it..🙁
<center>
But but but then you're embedding formatting into the semantics. 😉
It makes life so much easier than
.mydiv { margin:0 auto; }
.mydiv { width:300px; margin-left:auto; margin-right:auto; }
or
.mydiv { margin-left:50%; margin-right:50%; }
Less code can't be a bad thing over all!
<!doctype html> <html> <head> <title>test</title> <style type="text/css"> .c { text-align:center; } .i { font-style:italic; } .b { font-weight:bold; } .px22 { font-size:22px; } </style> </head> <body> <div class="c i b px22">Centered bold 22px italics</div> </body> </html>
cluelessPHP;11055143 wrote:... Less code can't be a bad thing over all!
... Less code can't be a bad thing over all!
If you're absolutely sure you're never going to change the layout, that may be true; but if you do change the layout and the element is controlled by its class and/or id properties, then all you have to change is your CSS file, which is likely less intrusive than changing the PHP file that is generating your content. For long-term maintainability, you want to as much as possible separate your responsibilities: database interactions are separate from business logic are separate from page flow-control are separate from HTML output are separate from CSS layout -- especially as your application grows and needs to scale up. In other words, don't take a small shortcut now that may result in maintenance headaches later that take significantly more time than you originally saved. 🙂
oh...but still, guess I'll look at this thing
https://www.w3.org/TR/html5/introduction.html#html-vs-xhtml
XHTML is finished 😉
It's just that it's going to cost too much for some companies to convert ...
Couldn't Shadow DOM fix some of those issues? I remember watching a talk on it by Angelina Fabbro not long ago
https://www.youtube.com/watch?v=JNjnv-Gcpnw
NogDog;11055147 wrote:In other words, don't take a small shortcut now that may result in maintenance headaches later that take significantly more time than you originally saved. 🙂
In other words, don't take a small shortcut now that may result in maintenance headaches later that take significantly more time than you originally saved. 🙂
I just[sup]*[/sup] wish I had a better Karnak turban.
[*and maybe more trained monkeys ...]
dalecosp;11055155 wrote:I just[sup]*[/sup] wish I had a better Karnak turban. ...
I just[sup]*[/sup] wish I had a better Karnak turban. ...
[holds envelope to turban-topped head]
A: Siss, boom, bah.
[opens envelope and reads...]
Q: What is the sound of a sheep blowing up?
NogDog wrote:But but but then you're embedding formatting into the semantics.
But but but then you're embedding formatting into the semantics.
Not necessarily:
<center> <name>Center for Internet Security</name> <leadership> <leader designation="CEO">John M. Gilligan</leader> <leader designation="President & Chief Operating Officer">Steven J. Spano</leader> </leader> </center>
laserlight;11055165 wrote:Not necessarily: <center> <name>Center for Internet Security</name> <leadership> <leader designation="CEO">John M. Gilligan</leader> <leader designation="President & Chief Operating Officer">Steven J. Spano</leader> </leader> </center>
Took me a minute.... 😉