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)

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, 2022 in Others by Kichu
• 19,040 points
978 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, 2022 by narikkadan
• 63,600 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
789 views
0 votes
1 answer
0 votes
0 answers

Is it possible to create Pivot Chart with source data as Pivot Table using Apache POI?

Using apache POI separately, I can make ...READ MORE

Dec 15, 2022 in Others by Kithuzzz
• 38,000 points
729 views
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
4,681 views
0 votes
1 answer

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

yes to be precise it a bad ...READ MORE

answered Mar 1, 2022 in Digital Marketing by narikkadan
• 63,600 points
664 views
0 votes
1 answer

Is W3C validation important?

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

answered Feb 26, 2022 in Others by narikkadan
• 63,600 points
452 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
1,214 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
10,544 views
0 votes
1 answer

How to set a column as a range variable as long as there is data in it?

Try this: Dim rng As Range Set rng = ...READ MORE

answered Feb 16, 2023 in Others by narikkadan
• 63,600 points
616 views
0 votes
1 answer
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