w3schools is famously a dumpster fire, and frankly I think codecadamy is overrated. I'm not a designer, I can't give a good constructive answer to the question, but I know the answer is never w3schools.
I've seen posts on HN that described some questionable choices and some issues with w3schools, can't say they were wrong..
but I have learned, and re-learned many things with w3schools and used it many times to solve a quick 'how do I do X' with css or whatever.. mainly because they were in top search results for a while - but every thing I used them for worked
- and they have interactive examples you can fiddle with, without having to work with a server or whatever, so I think it's fair to say there may be some issues of concern - but dumpster fire I think is an exaggeration
- frankly the UI of the site is easier for me and I assume many others, even if MDN is more accurate or more thorough, it's not so easy on the eyes imho.
Also - codeadamy I found great - great because you can actually write some code while learning - now if you are the kind of person who wants to watch a 3 hour video to learn, then it's not for you.. but I've done long videos, short videos, long books, picture books, interactive, and all sorts.. frankly for me, codeacademy was great for is interactivity,and actual doing stuff while learning.
some of udemy and coursera courses I've enjoyed ask you to write code while learning with the videos - and if you do that- great - but it's not a lot of fun with small laptop screen.. as to where codeacademy and similar are setup for show and write at same time with a better use of screen imho.
Someone needs a click to zoom in one code for video and make it more codeacademy like - at least for my favorite learning style... but I'm okay with books too - so I guess it's each to their own.
Even w3fools.com has conceded that the big problems have long been fixed and it's okay now: "Today, W3Schools has largely resolved these issues and addressed the majority of the undersigned developers' concerns. For many beginners, W3Schools has structured tutorials and playgrounds that offer a decent learning experience."