Ironically, the lists on this page are paragraph tags.
Write HTML Like It's 1999
171–180 of 191 posts
Re: Write HTML Like It's 1999
#172Earlier quoted context omitted.
> run arbitrary code on their machine That's a bit of an exaggeration. JavaScript is strongly sandboxed and has a pretty good permissions system. The only malicious things it can really do are 1) based on cookies or 2) crypto mining. Personally I think it's unreasonable to expect today's sites to work without JavaScript completely. The real benefits of using it sparingly are: - Pages load faster - Pages are more resp…
> JavaScript is strongly sandboxed and has a pretty good permissions system We now live in a post-Spectre world. I don't think a sandbox means all it meant in 2017.
Re: Write HTML Like It's 1999
#173Really almost all of this comes down to, "don't use JavaScript to replace HTML". Everything else on this post derives from that one guideline. For example, "Implementing custom div layouts for forms while removing items like select or radio" is only possible if you're replacing native functionality with JavaScript. Which is perfectly fine advice if you aren't doing anything really novel. You probably don't need a cus…
> Content being heavily reliant on JavaScript “injection” Salient point right here. Being served a blank white page (when JS is disabled) can deter a person from ever visiting a site again. Some peope out there want to vet a site before allowing it to run arbitrary code on their machine.
Re: Write HTML Like It's 1999
#174While I agree that semantic HTML is a nice thing, I am also confused because the HTML I saw in 1999 didn't look like what the author suggests. If I am not completely mistaken, nav is an HTML5 element that didn't even exist back then. Instead, we used tables inside tables insides tables inside iframes to structure our navigations. CSS was still some mystic magic that only a few wizards knew how to use effectively. And…
I think clearly author was using "like it's 1999" as a metaphor, not literally. It's a fairly common phrase (originating from a Prince song I think) that you can take to mean "like a throwback to a more authentic and possibly prior era." In this case the era is prior the explosion of frameworks and div soup. Which strangely in this case is not necessarily prior but in parallel, as you said. This is English, it doesn'…
Re: Write HTML Like It's 1999
#175Was I the only one who clicked this expecting React components for modern CSS layouts using markup like and Last Updated: June 1999 Otherwise you’re not writing HTML like it’s 1999, you’re writing HTML like it’s the web standards movement of the early 2000s before AJAX and Web 2.0 started trending. If you really want to write HTML like it’s from 1999, read this blast from the past: https://www.w3.org/TR/2018/SPSD-htm…
While the spacer.gif made me really nostalgic, this is one of the things I don't miss. However, layoutwise HTML is at the moment much like it had been in 1999: The basic structure with banner, nav, main, footer is much like the standard frameset, if there had only been role/landmark-markup for frames, and CSS-grid in its basic form is much like table-layout (less those Daliesque "poles" for positioning). Where there…
Wasn't innerHTML still settable back then?
Re: Write HTML Like It's 1999
#176As someone who has a pretty serious visual impairment, I find the attitude of so many of these comments really... disappointing. You wouldn't believe how much effort people with poor vision have to go to, to consume the modern web. You can't even take simple things for granted like being able to zoom. So many websites pollute their page with pointless navigation elements that block most of the content when the page i…
I am also not in the US, so I can't tell my boss to spend disproportionate amount of dev time on something that doesn't make money.
Re: Write HTML Like It's 1999
#177Earlier quoted context omitted.
> Content being heavily reliant on JavaScript “injection” Salient point right here. Being served a blank white page (when JS is disabled) can deter a person from ever visiting a site again. Some peope out there want to vet a site before allowing it to run arbitrary code on their machine.
> run arbitrary code on their machine That's a bit of an exaggeration. JavaScript is strongly sandboxed and has a pretty good permissions system. The only malicious things it can really do are 1) based on cookies or 2) crypto mining. Personally I think it's unreasonable to expect today's sites to work without JavaScript completely. The real benefits of using it sparingly are: - Pages load faster - Pages are more resp…
Web apps on the other hand, probably do need them. I use newsblur and definitely enjoy the shortcuts.
Re: Write HTML Like It's 1999
#178Earlier quoted context omitted.
Why not inject css instead? That would be more effective
how do you mean?
var node = document.createElement('style');
node.innerHTML = '* { outline: 2px dotted orangered; };
document.body.appendChild(node);Re: Write HTML Like It's 1999
#179Really almost all of this comes down to, "don't use JavaScript to replace HTML". Everything else on this post derives from that one guideline. For example, "Implementing custom div layouts for forms while removing items like select or radio" is only possible if you're replacing native functionality with JavaScript. Which is perfectly fine advice if you aren't doing anything really novel. You probably don't need a cus…
> The one part I disagree with is necessarily using in place of divs with CSS Grid. I suppose the soundness depends on how you read the word "table". For actual tabular data, is probably the right choice for accessibility reasons. It's also why it's usually a bad idea to abuse tables for grid layouts in other cases.
> It's also why it's usually a bad idea to abuse tables for grid layouts in other cases.
This isn't so much about semantics, it's about the way it kills responsiveness
Re: Write HTML Like It's 1999
#180Earlier quoted context omitted.
how do you mean?
Like this: https://stackoverflow.com/questions/15505225/inject-css-styl... var node = document.createElement('style'); node.innerHTML = '* { outline: 2px dotted orangered; }; document.body.appendChild(node);
document.head.appendChild(document.createElement('style')).textContent = '* { outline: 2px dotted orangered'