News for hackers. Stuff that matters.
Re:W3.css – A minimal alternative to Bootstrap by willio58 on Tuesday September 13, 2022 @08:14PM (#32831759)
Anytime I land on w3schools, I go back to google and click on the MDN link. This was a learned behavior that I don't even question now.

Has w3schools gotten any better over the years? Would anyone consider using this or any package from them?

Re:W3.css – A minimal alternative to Bootstrap by MatthiasPortzel on Tuesday September 13, 2022 @09:25PM (#32832227)
I just pulled up the page for String.match, which is a weird function because it returns an array that has named properties on it. W3Schools doesn't mention that. It just says it "method returns an array with the matches." It also doesn't mention the behavior without the global flag. I also noticed a misspelling ("Differense").

=> https://www.w3schools.com/jsref/jsref_match.asp

=> https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

Comparing these two pages, only the second one is competent at describing what the function actually does. Neither is perfect. The MDN doesn't do a great job of communicating all the information, but at least all of the information is there.

Re:W3.css – A minimal alternative to Bootstrap by djbusby on Tuesday September 13, 2022 @10:28PM (#32832620)
Can't we also issue PR against MDN?
Re:W3.css – A minimal alternative to Bootstrap by latchkey on Tuesday September 13, 2022 @11:11PM (#32832894)
Yes and they are very responsive about getting it merged in.
Re:W3.css – A minimal alternative to Bootstrap by golergka on Wednesday September 14, 2022 @08:23AM (#32836138)
What?!

I think I've been using MDN for 20 years (I don't remember honestly when it first came to be), but it's first time I hear about it. Banner/link blindness is a hell of a thing! Thanks for letting me know.

Re:W3.css – A minimal alternative to Bootstrap by nextaccountic on Thursday September 15, 2022 @04:38AM (#32848970)
Mozilla fired basically the entire MDN team with the rationaly that the "community" will pick up the slack with PRs and such

https://news.ycombinator.com/item?id=24132494

This was in 2020, I don't know if they eventually hired _someone_ to work on MDN

Re:W3.css – A minimal alternative to Bootstrap by latchkey on Wednesday September 14, 2022 @10:07AM (#32837395)
At the very bottom of the page is:

"Found a problem with this page?"

With a section on how to edit it.

Re:W3.css – A minimal alternative to Bootstrap by golergka on Wednesday September 14, 2022 @10:19AM (#32837606)
Yes, and that's exactly what years of using MSDN and other similar documentation sites have taught me to be blind too.
Re:W3.css – A minimal alternative to Bootstrap by marwis on Wednesday September 14, 2022 @03:23PM (#32842025)
For quite a while now MSDN has edit button that takes you to the source of the page on GitHub :)
Re:W3.css – A minimal alternative to Bootstrap by Waterluvian on Tuesday September 13, 2022 @09:59PM (#32832420)
Tangent: why is .match on Symbol? I read through string.match and looked at Symbol and I don’t understand why all these helpful functions exist on Symbol.
Re:W3.css – A minimal alternative to Bootstrap by jchw on Tuesday September 13, 2022 @10:05PM (#32832464)
Symbol.match is not the match function, it is a Symbol which can be used as a property key on an object that is supposed to behave like a regular expression.

The purpose of having Symbol values is to ensure the property keys are unique and can't collide with string keys that predate new standards.

Re:W3.css – A minimal alternative to Bootstrap by acdibble on Wednesday September 14, 2022 @05:42AM (#32834998)
Re:W3.css – A minimal alternative to Bootstrap by Waterluvian on Thursday September 15, 2022 @08:34AM (#32850828)
Ohhhh okay. So it’s just a flag describing expectations about an object. And as a Symbol it doesn’t interfere with any other part of the object such as properties or iteration.
Re:W3.css – A minimal alternative to Bootstrap by chillfox on Wednesday September 14, 2022 @02:45AM (#32833998)
I would say they haven't changed much over the years, but I always quite liked them for just getting answers to simple things fast.

MDN is of course fantastic, but generally requires more reading/scrolling and is therefore slower for simple things like what's the markup for a button or select drop down thing look like again.

As for the w3.css style sheet, it's quite good for sprucing up small internal web apps.

Re:W3.css – A minimal alternative to Bootstrap by rchaud on Wednesday September 14, 2022 @10:55AM (#32838127)
You nailed it about the appeal of W3: It's quick to get to the point.

I can read the first para and figure out what I'll be learning. The code examples are interactive and visual, and help enormously.

MDN reads like a technical reference. Wordpress documentation is similarly structured, but it has a comments section with a lot of sample code for different use cases, which helps me figure out whether the function I'm looking at will help accomplish what I am trying to do.

Re:W3.css – A minimal alternative to Bootstrap by pwdisswordfish9 on Wednesday September 21, 2022 @09:46AM (#32925083)
> You nailed it about the appeal of W3

W3Schools isn't "W3". It's W3Schools. To put it another way, W3Schools is "W3" in the same way that JavaScript is "Java" or Wikipedia is "Wiki".

Re:W3.css – A minimal alternative to Bootstrap by lxe on Tuesday September 13, 2022 @09:09PM (#32832107)
W3schools has completely redeemed itself at this point. The content is much much better than it was 10 years ago.
Re:W3.css – A minimal alternative to Bootstrap by laundermaf on Wednesday September 14, 2022 @02:15AM (#32833834)
Not. As shown in many examples in this thread.
Re:W3.css – A minimal alternative to Bootstrap by rchaud on Wednesday September 14, 2022 @11:08AM (#32838322)
Look at the examples of W3schools' errors in the thread, and then compare them to what a beginner learning experience is actually going to be like.

Step 1: W3schools.com is the first link on Google, so I'll go there.

Step 2: OK, I copy/pasted some of the code into my Sublime Text scratchpad file, but I'm getting an error when I load it in the browser.

Step 3: Do a search on the error message, StackOverflow is the first result. Go there and find the issue (syntax error on W3schools page)

Compare this to a world where StackOverflow is always #1. Try posting a question about learning HTML and CSS and see how fast the mods delete your question. W3Schools serves an important purpose.

Re:W3.css – A minimal alternative to Bootstrap by Tao3300 on Wednesday September 14, 2022 @07:59AM (#32835940)
But also yes, as shown by many other examples in this thread. Huh.
Re:W3.css – A minimal alternative to Bootstrap by account-5 on Tuesday September 13, 2022 @08:39PM (#32831916)
As a beginner, with no history, w3schools is way better than MDN.
Re:W3.css – A minimal alternative to Bootstrap by lelandfe on Tuesday September 13, 2022 @10:11PM (#32832507)
As someone who helps beginners learn CSS regularly at my job, my biggest qualm with MDN is that they tend to leave out the why.

Check out this page: https://developer.mozilla.org/en-US/docs/Web/CSS/margin-bloc...

> The `margin-block` CSS shorthand property defines the logical block start and end margins of an element, which maps to physical margins depending on the element's writing mode, directionality, and text orientation.

Whew, that's a lot.

Setting aside how inside baseball the terms "logical block" and "physical margin" are, this description fails to tell the reader why they would want to use this property. Why use this, instead of `margin`? It's nowhere on the page. Typically, that reasoning lays buried in the distant and forbidden "Guides" section (which MDN's search doesn't index).

To find our reasoning, you must go to Guides, under CSS expand "CSS building blocks," then finally click "Handling different text directions": https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_...

“But look, you found the explanation for `margin-block`, didn’t you?”

“Yes I did. It was on display in the bottom of a locked filing cabinet stuck in a disused lavatory with a sign on the door saying 'Beware of the Leopard.'”

Re:W3.css – A minimal alternative to Bootstrap by blakblakarak on Wednesday September 14, 2022 @02:59AM (#32834096)
This is a good resource for beginner too: https://tympanus.net/codrops/css_reference/
Re:W3.css – A minimal alternative to Bootstrap by marcosdumay on Wednesday September 14, 2022 @11:09AM (#32838331)
You can't expect long documentation for beginners to be inline on the reference pages. Just start teaching the beginners you help how to find the guides.
Re:W3.css – A minimal alternative to Bootstrap by lelandfe on Wednesday September 14, 2022 @11:50AM (#32838886)
The guides are written for beginners. But an explanation of why does not need to be. It could even be included in that intro paragraph with just a sentence or two, with a link out to the guide for more.

> how to find the guides

I'll let you know when I learn how to find the guides. I didn't even know that one existed until I scoured the site.

Re:W3.css – A minimal alternative to Bootstrap by marcosdumay on Wednesday September 14, 2022 @11:58AM (#32839032)
There are a lot of guides. If you go to the more general references on the hierarchy (indexed at the left side), you will find small explanations on the why with links for the guides.

What you won't find are general details on the more specific references. Unfortunately, search engines prefer the specific ones, so you will have to backtrack by yourself.

Re:W3.css – A minimal alternative to Bootstrap by kube-system on Tuesday September 13, 2022 @08:47PM (#32831962)
MDN has really good beginners guides, if you go to their tutorial section and not the detailed documentation.

https://developer.mozilla.org/en-US/docs/Learn/Getting_start...

Re:W3.css – A minimal alternative to Bootstrap by synergy20 on Tuesday September 13, 2022 @10:17PM (#32832546)
agreed, somehow w3schools just made stuff really easy to learn, easy to navigate, and easy to refer.

I only need MDN when I want to read stuff 'deep', but 98% of the time I don't need that depth.

MDN is also hard to navigate, it works like a thick dictionary to me, it will be needed, but only rarely.

Re:W3.css – A minimal alternative to Bootstrap by rchaud on Wednesday September 14, 2022 @10:51AM (#32838065)
Tried learning HTML/CSS through that site in 2006. Terrible experience, so I continued to use Dreamweaver for personal projects.

Tried learning again in 2014, after a career change: Excellent experience, so good that I go there first.

I simply did not grok responsive design until I read their article about floats and media queries. I was trying to get admitted into a bootcamp at the time, and my assignment was to recreate a landing page from a PNG image, without using Bootstrap or any other grid framework.

Most official sources of technical documentation online are written by and for developers, and assume a lot of prior knowledge. I never understood a lick of the official jQuery documentation either, until I went through W3schools section on it, and then later Jon Duckett's beautifully visual dead-tree book on JS and jQuery.

Re:W3.css – A minimal alternative to Bootstrap by Ayesh on Wednesday September 14, 2022 @02:44AM (#32833994)
I can only judge them based on CSS and PHP content because those are the things I can even properly compare. W3schools continue to be a very low quality resource, incomplete and incoherent on most aspects.

There is a "try it yourself" that I sometimes use, merely because it's quick to whip something up, and much more faster than codepen.

Re:W3.css – A minimal alternative to Bootstrap by duxup on Tuesday September 13, 2022 @08:43PM (#32831936)
They’re handy for beginners.

MDN is a bit technical at times and doesn’t always have detailed examples a beginner might hope for.

Re:W3.css – A minimal alternative to Bootstrap by Izkata on Tuesday September 13, 2022 @09:08PM (#32832093)
Eh. I'm the same as GP, because back before learned that behavior, w3schools had plenty of straight up wrong information. So their question still stands: have they gotten better?
Re:W3.css – A minimal alternative to Bootstrap by duxup on Tuesday September 13, 2022 @09:11PM (#32832125)
I haven’t seen anything wrong in years
[dead]
Re:W3.css – A minimal alternative to Bootstrap by TheMaskedCoder on Tuesday September 13, 2022 @11:55PM (#32833164)
This is false. Paul Irish still has the repository for w3fools on Github. You can verify[1] that Paul Irish himself revised the text. Paul Irish works for Google. There is no reason to think that w3schools paid him to revise the content. There is a closed issue that explains the reasoning[2]

1: https://github.com/paulirish/w3fools/commits/gh-pages

2: https://github.com/paulirish/w3fools/issues/50

Re:W3.css – A minimal alternative to Bootstrap by chrisweekly on Friday September 16, 2022 @05:26PM (#32872203)
Thank you for remedying my ignorance; I was in fact mistaken. It's too late to edit my comment, but I won't repeat my invalidated claim again.

That said, I will continue to resent and distrust and disparage w3schools because of their shady past. The only reason they cleaned up their act was the concerted efforts of w3fools, Paul Irish et al -- which efforts were only ever expended bc w3schools had succeeded in pwning SEO/SERPs and it was such a distraction and blight on our profession.

It's like a politician gaining office via election fraud / ballot-stuffing, then proposing legislation to improve voter rights; they shouldn't be in office.

Re:W3.css – A minimal alternative to Bootstrap by albedoa on Wednesday September 14, 2022 @12:36AM (#32833371)
You have made this claim before: https://news.ycombinator.com/item?id=30722020

Will you back it up this time?

Re:W3.css – A minimal alternative to Bootstrap by chrisweekly on Friday September 16, 2022 @05:29PM (#32872236)
I was in fact wrong about the details of w3fools' updated stance. See other comment upthread.
Re:W3.css – A minimal alternative to Bootstrap by irrational on Tuesday September 13, 2022 @10:59PM (#32832811)
Do you have a reference to them buying it out. This is the first time I’ve heard this claim.
Re:W3.css – A minimal alternative to Bootstrap by chrisweekly on Friday September 16, 2022 @05:27PM (#32872213)
mea culpa, I was wrong

(see my newer comment upthread)

Re:W3.css – A minimal alternative to Bootstrap by lelanthran on Wednesday September 14, 2022 @02:13AM (#32833824)
> Has w3schools gotten any better over the years? Would anyone consider using this or any package from them?

Yeah. I prefer it to MDN sometimes because they usually have a "try it yourself" that actually works very well.

Doesn't matter how much better the MDN doc might be, I often just want to try it myself.

Re:W3.css – A minimal alternative to Bootstrap by iaml on Wednesday September 14, 2022 @03:04AM (#32834122)
MDN also has a “try it” widget [0], works well enough for my purposes.

[0] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

Re:W3.css – A minimal alternative to Bootstrap by lelanthran on Wednesday September 14, 2022 @04:51AM (#32834704)
It never used to be on all pages, though.
Re:W3.css – A minimal alternative to Bootstrap by wil421 on Wednesday September 14, 2022 @06:29AM (#32835276)
It’s been on most if not all pages for years now.
Re:W3.css – A minimal alternative to Bootstrap by tiborsaas on Wednesday September 14, 2022 @07:03AM (#32835493)
No. The issue is that it's sometimes OK, sometimes good and sometimes hilariously bad. I don't want to play russian roulette with docs so I installed W3School blocker extension to weed out the problem at the root :)
Re:W3.css – A minimal alternative to Bootstrap by doytch on Tuesday September 13, 2022 @09:00PM (#32832043)
Ha, same. Though I've been using Kagi Search for a few months now and blocked W3Schools from my search results so I never make this mistake anymore.
Re:W3.css – A minimal alternative to Bootstrap by tjpnz on Tuesday September 13, 2022 @10:19PM (#32832561)
I do have a deep-seated fear of being seen as less competent if someone saw it up on my screen.
Re:W3.css – A minimal alternative to Bootstrap by remram on Tuesday September 13, 2022 @11:08PM (#32832876)
I wrote a search-result filter extension (actually TamperMonkey script) just for w3schools, many years ago! Then I added all those auto-generated comparison sites: stackshare, wikidiff, etc.

It's satisfying to see that my dislike is not some unfounded personal quirk!

Re:W3.css – A minimal alternative to Bootstrap by kodt on Tuesday September 13, 2022 @08:32PM (#32831863)
Yes they improved considerably from the past but old habits are hard to break.
Re:W3.css – A minimal alternative to Bootstrap by irrational on Tuesday September 13, 2022 @10:56PM (#32832792)
I would use the website. I don’t know anything about the library.

W3schools has gotten a lot better I’ve the past 5 years or so. I use it for quick lookups and only go to mdn when I’m trying to learn something new.

Re:W3.css – A minimal alternative to Bootstrap by err4nt on Wednesday September 14, 2022 @10:53AM (#32838096)
They have some good resources for obscure technologies, like XPath, but for the big ones like HTML/CSS/JS there's both the danger that they're out of date and not showing you what's new, while also possibly showing you old hacks and workarounds that are against modern best practice.

MDN is a better choice for (almost) anything MDN has content for.

Re:W3.css – A minimal alternative to Bootstrap by rchaud on Wednesday September 14, 2022 @10:57AM (#32838172)
How much of the core of HTML/CSS/JS has been deprecated?

Somebody going to W3schools probably isn't looking for the latest and greatest. The person who is looking for that would already have a good grasp of the fundamentals, and would have graduated to looking elsewhere, like StackOverflow or Caniuse.com.

Re:W3.css – A minimal alternative to Bootstrap by theandrewbailey on Wednesday September 14, 2022 @08:22AM (#32836132)
Use a better search engine that uses bangs like DuckDuckGo or Brave.

!mdn search term

brings you directly to MDN's search result page for search term.

Re:W3.css – A minimal alternative to Bootstrap by Waterluvian on Tuesday September 13, 2022 @09:53PM (#32832391)
I use a plug-in to hide w3schools from results. MDN is amazing.
Re:W3.css – A minimal alternative to Bootstrap by hamboga on Tuesday September 13, 2022 @11:38PM (#32833087)
I'm not an expert, but W3 schools uses <br> in their examples which is a bad way of teaching since my understanding is that there is never a good reason to use a <br> especially not to format a page, which is a habit I had to drop because I learned it from w3.
Re:W3.css – A minimal alternative to Bootstrap by jakelazaroff on Wednesday September 14, 2022 @02:35AM (#32833952)
What’s wrong with <br>? It’s a perfectly semantic way to insert a line break. I use it often when I’m trying to get a block of text to look good at multiple breakpoints.
Re:W3.css – A minimal alternative to Bootstrap by sn0n on Wednesday September 14, 2022 @04:50AM (#32834699)
I think the main reason given is if you think something needs a br tag, the content before and after should probably be in p tags or something else. That's at least what my 2am brain remembers reading somewhere some years ago.
Re:W3.css – A minimal alternative to Bootstrap by jakelazaroff on Wednesday September 14, 2022 @09:33AM (#32836930)
<p> tags are for paragraphs. If you’re trying to break in the middle of a paragraph or sentence, they’re the wrong tool to use. Also, they’re not flexible across breakpoints like <br> tags are.
Re:W3.css – A minimal alternative to Bootstrap by wnevets on Tuesday September 13, 2022 @08:55PM (#32832011)
> Has w3schools gotten any better over the years?

Their website has, no idea about the company itself tho.

Re:W3.css – A minimal alternative to Bootstrap by dpcan on Wednesday September 14, 2022 @10:53AM (#32838099)
You’re missing out.

It’s probably the best and easiest to use css/js/html reference site anywhere.

I can’t gauge how it’s changed but I find it’s to-the-point and example driven format is perfect for the way I learn.

Re:W3.css – A minimal alternative to Bootstrap by rchaud on Wednesday September 14, 2022 @11:01AM (#32838228)
They definitely updated the content of the site. But they left the look (color scheme, etc) largely unchanged from the 2000s, so opening the site probably reminds some people of the bad old days.
Re:W3.css – A minimal alternative to Bootstrap by anonymous344 on Wednesday September 14, 2022 @06:45AM (#32835364)
This. That is just awful site. Like created just to make you go crazy
Re:W3.css – A minimal alternative to Bootstrap by _the_inflator on Wednesday September 14, 2022 @04:18AM (#32834515)
This here is for you then: https://www.w3fools.com/ ;)

w3schools got way better, but back then w3fools had its reason.

Re:W3.css – A minimal alternative to Bootstrap by RockRobotRock on Wednesday September 14, 2022 @01:40AM (#32833673)
W3schools sucks but still holds a place in my heart from my youth
Re:W3.css – A minimal alternative to Bootstrap by benknight87 on Wednesday September 14, 2022 @06:14AM (#32835177)
I did this so much that I got into the habit of putting "mdn" before any search query. Now I do it without even thinking about it.
Re:W3.css – A minimal alternative to Bootstrap by reidrac on Wednesday September 14, 2022 @06:18AM (#32835215)
In DDG you can just !mdn your search.
Re:W3.css – A minimal alternative to Bootstrap by jamesfinlayson on Tuesday September 13, 2022 @11:10PM (#32832889)
I always use it for SQL syntax - no other site seems to give basic details about the syntax for different constructs.