<b> tag in HTML 5 (was Re: [Rails] Re: assert_select for <p><b>text</b>value</p>)

Actually, it's back in in HTML5...

http://dev.w3.org/html5/spec/Overview.html#the-b-element

Everything old is new again.

Chris

Chris Mear wrote:

google has not provided an example of this type.

Any help would be much appreciated.

First off: you shouldn't ever be using <b> tags. �That's 1990s physical
styling. �That's *bad*. �You should be using a semantically named <span>
instead. �But you probably knew that already.

Actually, it's back in in HTML5...

http://dev.w3.org/html5/spec/Overview.html#the-b-element

Everything old is new again.

I didn't say it was invalid HTML. I said it was *bad practice*.

Chris

Best,

Yeah, that's why it's in the spec, 'cause no one should use it.

/rolls eyes

Though actually I think my use case is not such as described there, it
being a list of column names (bold) and values, generated by a Rails
scaffold some years ago.

Colin

Though actually I think my use case is not such as described there, it
being a list of column names (bold) and values, generated by a Rails
scaffold some years ago.

Colin

Colin Law wrote:

much more complex tasks but my mind seems to have gone blank and

http://dev.w3.org/html5/spec/Overview.html#the-b-element

Everything old is new again.

Though actually I think my use case is not such as described there, it
being a list of column names (bold) and values, generated by a Rails
scaffold some years ago.

Then you absolutely should not be using <b>. Use something semantic
instead, or if your design supports it, recast the whole thing into a
<table> and use <th> and <td> (which is what I'd normally do). The
semantics are tabular, so a <table> element would be quite appropriate.

Colin

Best,

+1. If only marnen were in charge.... :wink:

Bill Walton wrote:

I didn't say it was invalid HTML. �I said it was *bad practice*.

Yeah, that's why it's in the spec, 'cause no one should use it.

/rolls eyes

+1. If only marnen were in charge.... :wink:

The HTML 5 spec itself says <b> is only to be used as a last resort if
no other element is more appropriate. IMHO, that's never the case: even
if nothing more specific can be found, <span> is more appropriate than
<b>.

I assume <b> is in the spec for backward compatibility with legacy
markup.

One more time: I didn't say <b> is invalid. I didn't say <b> should be
removed from the spec. I didn't say I wanted to be in charge of the
HTML 5 spec. I said <b> is bad practice and should be avoided. I stand
by that statement.

Best,

+1. If only marnen were in charge.... :wink:

The HTML 5 spec itself says <b> is only to be used as a last resort if
no other element is more appropriate. IMHO, that's never the case:

So go get yourself on the HTML5 committee, you can help them un-think
that last resort case they thought of.

even
if nothing more specific can be found, <span> is more appropriate than
<b>.

Because it's always more appropriate to type more than you have to?

<b>foo</b>

<span>foo</span>

span{font-weight:bold;}

Marnen Laibow-Koser wrote:

Bill Walton wrote:

I didn't say it was invalid HTML. �I said it was *bad practice*.

Yeah, that's why it's in the spec, 'cause no one should use it.

/rolls eyes

+1. If only marnen were in charge.... :wink:

The HTML 5 spec itself says <b> is only to be used as a last resort if
no other element is more appropriate. IMHO, that's never the case: even
if nothing more specific can be found, <span> is more appropriate than
<b>.

I have to agree with Marnen. Are we criticizing people for emphasizing
exactly what the HTML5 spec states now?

I agree that <b> is maintained in the spec solely for backward
compatibility. I see no use case for a "proper" use of <b>. That tag
suggests too specific a styling (boldened). As recommended by the spec
<strong>, <em> or <mark> are more appropriate in most cases.

Here is the <strong>incorrect</strong> example presented in the spec:

<p><b>WARNING!</b> Do not frob the barbinator!</p>

In the above case the appropriate tag would be <strong> not <b>.

The <strong> tag suggests "WARNING!" should be presented "strongly"
without specifically suggesting "boldened." That may mean, "Display
WARNING! in yellow (and bold too)."

Speaking for myself, I am criticizing marnen's obnoxious and
judgmental posts. A post such as yours that takes the time to explain
to a poster why one approach is favored over another is welcome,
"that's bad" is simply an unsubstantiated opinion. If he's not going
to provide assistance, he should either keep his mouth shut or be
ready to be chastised / derided in the same manner he treats others.

Ditto.

Bill Walton wrote:

+1. If only marnen were in charge.... :wink:

The HTML 5 spec itself says <b> is only to be used as a last resort if
no other element is more appropriate. IMHO, that's never the case: even
if nothing more specific can be found, <span> is more appropriate than
<b>.

I have to agree with Marnen. Are we criticizing people for emphasizing
exactly what the HTML5 spec states now?

Speaking for myself, I am criticizing marnen's obnoxious and
judgmental posts.

I didn't intend to be obnoxious. I *did* intend to be judgmental of bad
practice.

A post such as yours that takes the time to explain
to a poster why one approach is favored over another is welcome,
"that's bad" is simply an unsubstantiated opinion.

I explained my rationale in an earlier post. You appatently neither
read it nor asked for the clarification which I would have been happy to
reiterate if requested. This is not the first time that you've taken me
to task for supposedly failing to provide information that I in fact
provided.

Legitimate criticism is welcome. But if you can't bother to check that
the criticism is borne out by the facts, then please don't bother to
post it.

If he's not going
to provide assistance, he should either keep his mouth shut or be
ready to be chastised / derided in the same manner he treats others.

I provide lots of assistance, and regularly get thanked for it. If
you're going to criticize something about my posts, please make sure the
criticism actually applies. In this case, your stated criticism was
simply inaccurate.

Best,

As I said before, I agree entirely. But as I also said before it is a
little used admin page and so improving the aesthetics of the html is
not the most important job at the moment.

Colin

Colin Law wrote:

Then you absolutely should not be using <b>. �Use something semantic
instead, or if your design supports it, recast the whole thing into a
<table> and use <th> and <td> (which is what I'd normally do). �The
semantics are tabular, so a <table> element would be quite appropriate.

As I said before, I agree entirely. But as I also said before it is a
little used admin page and so improving the aesthetics of the html is
not the most important job at the moment.

I quite understand that, though at the same time I like to take a "fix
broken windows" approach -- that is, I like to fix obvious small
problems if I'm working on the file anyway.

Colin

Best,

Agreed again, I am not actually modifying that page, just adding a
test for a special case.

Cheers

Colin

Colin Law wrote:

little used admin page and so improving the aesthetics of the html is
not the most important job at the moment.

I quite understand that, though at the same time I like to take a "fix
broken windows" approach -- that is, I like to fix obvious small
problems if I'm working on the file anyway.

Agreed again, I am not actually modifying that page, just adding a
test for a special case.

Sure, that makes sense.

Cheers

Colin

Best,