Quick silly semantics question (links with emphasis)
I have a link that needs to have or applied. Should the or go inside or outside of the tag? Or does it matter?
Would it be:
or
I can't decide myself. I'm leaning towards it doesn't matter.
I have a link that needs to have or applied. Should the or go inside or outside of the tag? Or does it matter?
Would it be:
or
I can't decide myself. I'm leaning towards it doesn't matter.
Abhishek Reddy posted this at 17:30 — 27th November 2006.
He has: 3,348 posts
Joined: Jul 2001
Though it shouldn't matter, I'd go with the first option because its DOM tree structure makes more sense to me. For example, if you had "a list of links", you might expect the first child node of every list item to be an anchor. But if it was wrapped in emphasis tags, then you'd get an em node instead.
As well, you can view the emphasis markup as being applied to the text (a DOM Text node), rather than the link itself. That is, the text would be emphasised whether it was a hyperlink or not. And if you did mean for the link to be emphasised, you'd use CSS anyway.
andy206uk posted this at 18:59 — 29th November 2006.
He has: 1,758 posts
Joined: Jul 2002
Good question! The way I would decide is whether it's the link that's important or the text. If the link is important then use option one, otherwise use the second one.
Andy
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.