Forum Moderators: open
For example, a link that is in bold may be:
<strong><a>...
or
<a>...<strong>
So, sometimes a link is within the strong tags, and sometimes is not, but text only.
Why is this? Is it just about order how you apply tags (insert link first, then strong, or vice versa).
Does it matter?
Same would apply to tags like <u> or <em>, and so on.
Thanks
While working in DreamWeaver (Studio 8), I see that tags like strong and hyperlink (a) are being applied in different order.
I think I know why this is happening, and is one in the many reasons of why I detest WYSIWYG editors. :-) It's how you "select" the elements, that is, using the pipe characters to demonstrate the begin and end of making a "selection," if you select like this,
<a href="#">¦some text¦</a>
and apply a style, it will do
<a href="#"><strong>some text</strong></a>
but if you select it like this,
¦<a href="#">some text</a>¦
the result is
<strong><a href="#">some text</a></strong>
It's really hard to hit it right. It is also probably why you see tons of empty markups in WYSIWYG documents:
<font family="Arial"><strong><em></em></strong></font>
The end users that produce these empty tags never even know they are there, because they don't look at the code.
IMO, besides the functional problems mentioned above, I've always kept to the policy that a link should only contain link text, and nothing else - don't know if that's a rule or anything, but makes for easier to maintain documents and avoids problems. Exception:
<a href="#">Sometimes you want to <strong>bold</strong> a word</a>
CSS is not the problem as links are not affected by combined CSS and those tags.... hmmm .... what about a { text-decoration: none} and then a:hover {text-decoration: underline}, and then you apply <u> tags to some of the links?
I mean, will that confuse SEs? I'm not concerned about actual outcome on the screen.
In regards of Dreamweaver, yes, lately I always apply tags right in the code, rather than in design mode which many times creates those mixed tags.