Page 2 of 2

Posted: Thu Dec 29, 2005 5:44 am
by Roja
Everah wrote:From what I've read at w3c, <b> is being depricated along with <i> and <u>. <strong> is now favored in place of <b>, <em> is now used in place of <i> and <u> is being thrown out altogether in favor off CSS underlining. Oh well, I haven't used the old ones for a while (Hey, I did a good thing!, Yippee!).
Thats not true. In the most recent XHTML, all of those are still valid.

People get confused about where its going because there is a *context* choice in when you are supposed to use one over the other. Its not a simple "always/never" rule, which makes it harder.

This blog entry: http://mpt.net.nz/archive/2004/05/02/b-and-i does a great job explaining the differences, and when/why you'd use one over the other.

In a nutshell, <b>, and <i> are styling elements. It says "Make my text look a certain way". Strong and emphasis however, says "These elements have a different meaning from the rest of the text". They do happen to have the same default style in most browsers, which is why they seem to be the same until you think about what they 'mean'. Imagine that both had stylesheet rules which made them look like other text, so the only difference was in the sourcecode. Then which has meaning in the context you are using it?

<b> means make this look bold. If its not being made bold, it has no meaning. Strong, on the other hand, says this is a point I would like to have stand out. There is definitely a difference in those two messages, yes?

Thats what semantic html is about - giving better meaning to your code, to help parsing engines and programmers understand it. (As a side benefit, it also usually improves your site layout).

Or put another way, <b> and <i> are not evil - they are just commonly misused.

Posted: Thu Dec 29, 2005 5:47 am
by foobar
jshpro2 wrote:Well the title of the thread was not "do you use standards most of the time", it was "what are the bad things you do". You just admited to a chat script that is not standards complaint which contradicts your first post in the thread.
No it isn't. I made the most part of that chat application over a year ago, at which time I wasn't into standards-compliant code. What I do now is completely different. Also, you may have noticed that my first post was dripping with sarcasm.

Posted: Thu Dec 29, 2005 6:18 am
by RobertGonzalez
Roja, I was wrong on 2 of the 3. <u> is deprecated. The others, you were dead on. Here is the w3 list of tags and their status.

Thanks for setting me straight.

Posted: Thu Dec 29, 2005 7:08 am
by mickd
Roja wrote: Thats not true. In the most recent XHTML, all of those are still valid.

People get confused about where its going because there is a *context* choice in when you are supposed to use one over the other. Its not a simple "always/never" rule, which makes it harder.

This blog entry: http://mpt.net.nz/archive/2004/05/02/b-and-i does a great job explaining the differences, and when/why you'd use one over the other.

In a nutshell, ....... Then which has meaning in the context you are using it?

<b> means make this look bold. If its not being made bold, it has no meaning. Strong, on the other hand, says this is a point I would like to have stand out. There is definitely a difference in those two messages, yes?

Thats what semantic html is about - giving better meaning to your code, to help parsing engines and programmers understand it. (As a side benefit, it also usually improves your site layout).

Or put another way, <b> and <i> are not evil - they are just commonly misused.
thanks for that information, ill now try my best to code that accordingly too ;)

Posted: Thu Dec 29, 2005 7:12 am
by Roja
Everah wrote:Roja, I was wrong on 2 of the 3. <u> is deprecated. The others, you were dead on. Here is the w3 list of tags and their status.

Thanks for setting me straight.
Oo! Good to know. Did not know <u> was deprecated. Awesome link! Thanks for the correction (and even more for the incredibly nice wording)

Posted: Thu Dec 29, 2005 10:52 am
by Moocat
I hardly ever comment, although I do pretty decent documention (enough to get by). I code procedurely way too much when I could be containing my code in modules more often and use more OOP making the code (which usually gets rather large) more maintainable.

Btw, here's a CSS optimiser I've been using which may be of some help to people: http://cdburnerxp.se/cssparse/css_optimiser.php

Posted: Thu Dec 29, 2005 11:36 am
by Chris Corbyn
I don't document nearly enough while I go along unless I'm made to do it. My comments are pretty good though and my code usually reads well. I'm recently starting to make good use of interfaces in PHP5 which of course is a good thing when other programmers start looking over your code -- documentation would be a lot better though :)

Standards compilant XHTML... I do my best but you have to find a balance between perfection and production time.

Posted: Thu Dec 29, 2005 1:59 pm
by Gambler
I have about 1 comment every 100 lines. Also, I've designed this website: feather.org.ru. But it's on PostNuke, so it couldn't posisbly be compliant anyways. Looks nice, though (except header and footer).

Posted: Thu Dec 29, 2005 3:46 pm
by jayshields
I comment too much. Sometimes I write a sentence for every line, lol. I don't do standards compliant XHTML either, because most stuff I code is for my use only, and if it works as I go along, it's fine :)

By the way, you say you designed that site above? You already said you used PostNuke for it...?

Posted: Thu Dec 29, 2005 4:57 pm
by Gambler
I designed it in terms of graphics. (Also, I made 250+ modifications to the system, but it still sucks.)

Don't get me wrong, I try to follow standards when it's reasonably easy. My company's website (which runs my own CMS/Framework) is mostly standard compliant, for example.