2
According to the reply of question I did here, the W3C discourages the use of a tag img
within a link (<a>
);
But this imposition of the W3C sounded a little controversial, because since I program for the Web I have done so, I have been taught to do so and I see many programmers doing so.
<a href="perfil.html"><img src="usuario.png"></a>
So, if we can’t create the image by merging "IMG into A", which is the alternative to creating a clickable link?
Javascript can’t be, right? If the W3C criticizes this practice, then what would be the alternative?
Well, I don’t agree @Guilhermeguini. W3C, from what I understand, deals with HTML coding. She couldn’t just suggest using Js. They have to give the solution to this
– Wallace Maxters
I was going to ask the same question, I even preferred it because I was curious about the right way to do it
– João Victor Gomes Moreira
I practically always did it the wrong way, I don’t know anything more kkkk
– João Victor Gomes Moreira
Guys, don’t worry. No one’s wrong, I’ll improve the answers
– Wallace Maxters
@Victorgomes look at the answer, really it is not wrong. It seems that there was a misunderstanding about what the answer meant. I apologize.
– Wallace Maxters
Great, I was looking about this possible "bad practice" and had found nothing, that good to know that we remain right haha
– João Victor Gomes Moreira