0

I got a comment for my question form Tobia Tesan but I can't msg in here.

php echo vs return, which way is better?

He suggest me change to <span class="wuuk_time"> instead of using <b>, which you'll define in a CSS file, thus achieving separation of database logic, output logic and presentation/styling.

First, what is so bad about using <b>?

Second, how do you separation of database logic, output logic and presentation/styling? I use CSS. is that not separation of logic and output?

Community
  • 1
  • 1
n00dle
  • 63
  • 5
  • Please ask one question in a post. I.e. `` part is more-or less duplicate of http://stackoverflow.com/questions/1348683/will-the-b-and-i-tags-ever-become-deprecated and partially opinion based as @lightbringer. The second part is probably way too broad.. – Alexei Levenkov Oct 15 '15 at 05:33

2 Answers2

1

Historically, <b> meant 'bold'. Since HTML4 it's meaning have been changed, so now it's a span of text stylistically different from normal text. There is nothing wrong in using <b> tag in your markup as long as you use it according to its semantics.

tsayen
  • 2,875
  • 3
  • 18
  • 21
  • What do you mean by "span of text" like ? – n00dle Oct 18 '15 at 04:04
  • well, I think by 'span' here they didn't really mean `` tag, just some text that spans some space :) – tsayen Oct 26 '15 at 15:18
  • thx Tsayen :) I work it out. is longer than in typing that one of reason I use at first, just easier. But when I look@reuse code, longer tag is goood :) – n00dle Oct 27 '15 at 14:33
1

It's a matter of 'best practices'. Avoiding inline styling, such as the use of the <b> tag is done to improve readability. You can then reuse the class "wuuk_time" throughout your HTML later, as you see fit.

Moreover, if you would like to change the styling to italicized instead of bold for example, it would be easier to change the "wuuk_time" class to reflect your desired changes throughout the webpage as opposed to hunting down all the individual <b> tags in your HTML.

Readability, Maintainability.