Is it bad practice to use spans as buttons W3Schools is doing that

0 votes

Consider this modal example (and a lot of other examples from them): https://www.w3schools.com/howto/howto_css_modals.asp

They use a span tag, that acts as a close button for the modal. Isn't this semantically incorrect? Or is there some legitimisation to do that?

It is kind of weird that the "web standardization consortium" is putting out examples like that. But maybe I am missing something here

Feb 25 in Others by Kichu
• 19,040 points
60 views

1 answer to this question.

0 votes

it wont become a bad practice if you add tabindex attribute  and a better prqactice is to add ARIA - attributes

if you think that w3cis doing it you are wrong in that case W3Schools is a low-quality advert-ridden tutorial site that happens to have good SEO because they've been around forever.

answered Feb 26 by narikkadan
• 21,680 points

Related Questions In Others

0 votes
1 answer

Is a good practice to use domain name generator?

To start off with let me explain ...READ MORE

answered Oct 28, 2019 in Others by Pavan
337 views
0 votes
1 answer
0 votes
1 answer

What is a name function in JavaScript & how to define it?

A named function declares a name as ...READ MORE

answered Mar 7, 2019 in Others by Frankie
• 9,830 points
1,281 views
0 votes
1 answer
0 votes
1 answer

Is W3C validation important?

try using use W3C conventions as much ...READ MORE

answered Feb 26 in Others by narikkadan
• 21,680 points
42 views
0 votes
1 answer

How blockchain hides it's HTML source?

When you click View Source, you see ...READ MORE

answered Jul 17, 2018 in Blockchain by Shashank
• 10,400 points
532 views
0 votes
2 answers

Define a SQL query? What is the difference between SELECT and UPDATE Query? How do you use SQL in SAS?

HI.. SQL is Structured Query Language, which is ...READ MORE

answered Aug 8, 2020 in PHP by anonymous
5,072 views
0 votes
1 answer
0 votes
1 answer

Why is just an ID in the URL path a bad idea for SEO?

yes it affects the click through rates ...READ MORE

answered Feb 20 in Others by narikkadan
• 21,680 points
68 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP