HTML links are like span tags

228 views
Skip to first unread message

John J Barton

unread,
Nov 30, 2009, 1:07:13 PM11/30/09
to Firebug
I learned a bit about <a> tags today, they inspect like span tags, not
like a container thing:
http://blog.getfirebug.com/2009/11/30/html-links-are-like-span-tags/
jjb

EugeneZ

unread,
Dec 2, 2009, 11:52:46 AM12/2/09
to Firebug
I thought the current FB behavior with regards to <a> tags made
perfect sense, up until I read the bug report you link to. From a CSS
perspective, the current behavior is correct, it seems to me, as <a>
is by default a display:inline tag (like <span>). I kind of get why
some would be confused by this, but all the same, this isn't something
I learned from the spec. I actually believe I learned it from FB or
Dom inspector, saw the short <a> with a big <img> inside and said to
myself "well, that looks funny... but, say, that's what it would look
like if it was a <span>..."

If someone had asked me if this was strange behavior, I would not
think so, but I can now see how someone could come to that conclusion.

That said, I think it would *also* be useful to know the effective
area of the <a> contents.... though if I had a choice between that and
showing me the correct CSS behavior, I'll take the latter... accuracy
should be FB's priority.

John J Barton

unread,
Dec 2, 2009, 12:54:06 PM12/2/09
to Firebug


On Dec 2, 8:52 am, EugeneZ <eugene....@gmail.com> wrote:
> I thought the current FB behavior with regards to <a> tags made
> perfect sense, up until I read the bug report you link to. From a CSS
> perspective, the current behavior is correct, it seems to me, as <a>
> is by default a display:inline tag (like <span>). I kind of get why
> some would be confused by this, but all the same, this isn't something
> I learned from the spec. I actually believe I learned it from FB or
> Dom inspector, saw the short <a> with a big <img> inside and said to
> myself "well, that looks funny... but, say, that's what it would look
> like if it was a <span>..."
>
> If someone had asked me if this was strange behavior, I would not
> think so, but I can now see how someone could come to that conclusion.
>
> That said, I think it would *also* be useful to know the effective
> area of the <a> contents.... though if I had a choice between that and
> showing me the correct CSS behavior, I'll take the latter... accuracy
> should be FB's priority.


Our current plan is to create a new "event target area" inspector
function for Firebug 1.6 in conjunction with eventbug. The exact UI
would need to be worked out, but for the example in the blog post and
bug report, the image would be included in the event target area for
the <a> tag.

jjb

Maciej Jaros

unread,
Dec 3, 2009, 2:55:06 PM12/3/09
to fir...@googlegroups.com
Strange I always though they were inline-block. BTW if you do add "a
{display:inline-block}" to FB blog, the link on the left will move below
the FB Bug's leg ;-).

Regards,
Nux.

Locoluis

unread,
Dec 18, 2009, 2:03:18 PM12/18/09
to Firebug
Uh...

http://getfirebug.com/tests/issues/2534/test.htm

The <span> is not closed. At line 15 there's </a> where there should
be </span>.

Is that intentional?

John J Barton

unread,
Dec 18, 2009, 2:16:50 PM12/18/09
to Firebug

No, I fixed the example. It takes a while to update the server. Does
not alter the results.

jjb

Reply all
Reply to author
Forward
0 new messages