Live data from Hacker News

Front-End Checklist

github.com

31–40 of 82 posts

Re: Front-End Checklist

#31

Earlier quoted context omitted.

I also found that odd. I've always placed mine in the HTML tag. tough, I don't know what the difference is.

Putting it on is better as that defines the language for as well. The lang attribute defines the language of the tree that the element is the root node of.

still, who uses it for what? browsers dont change behaviour because of it, search engines ignore it, users dont see it.

Re: Front-End Checklist

#32
post #23

Note that you don't actually need the head or body tags in your page. The browser already knows what is allowed in the head. It looks weird at first, but you can write your html like so: My Title Also note that the html tag can also be omitted, unless you need to set the language. Don't worry about closing it either.

Edit: my original comment (retained below) is wrong about this being malformed, and it's completely valid. Some more info here: https://html.spec.whatwg.org/multipage/syntax.html#optional-... --- Original comment : The fact that browsers are able to handle malformed HTML doesn't mean that you should do it that way. There's no meaningful benefit that I can think of, and the potential to break a ton of things that aren…

This is not malformed HTML. In fact, optional tags were in older HTML specs and are perfectly legal. Even in HTML 4.01 Strict. See: http://rimantas.com/bits/minimal_html.html

Re: Front-End Checklist

#33
This would be a good checklist for anyone considering building a UI framework. This kind of thing is the reason Bootstrap & friends are so large - they do a lot for you.

Re: Front-End Checklist

#34
post #14

> Alternative text: High All have an alternative text which describe the image visually. Please don't do that. Don't put an alt on ALL images. Screen readers will read all of them. Skin and flavour images don't deserve to be read outloud. Nobody wants to hear "bottom left corner of logo" or "rounded corner".

This recommendation would be fine 20 years ago. You should not have any decorative images in your markup, they belong to CSS.

Why? It shouldn't make any difference if you add alt="" to the img tag.

Re: Front-End Checklist

#35
An oft overstated thing -- but the organization of CSS is currently being massaged by the front end community, and in-line CSS is no longer considered an awful thing with Radium and others.

Re: Front-End Checklist

#36

Earlier quoted context omitted.

Actually I do work on a website that we do not want crawled. It would be handy to know which things to leave out to make it less likely your site will be crawled or show up high in a google result.

Just define a robot.txt file instructing the crawler to not index your website. See: http://www.robotstxt.org/

This is a common misconception:

https://support.google.com/webmasters/answer/7424835?hl=en#h...

> robots.txt Disallow does not guarantee that a page will not appear in results: Google may still decide, based on external information such as incoming links, that it is relevant. If you wish to explicitly block a page from being indexed, you should instead use the noindex robots meta tag or X-Robots-Tag HTTP header.

If it's something like a staging site, you'd be better putting it behind a login screen to prevent mistakes anyway.

Re: Front-End Checklist

#37
post #14

Earlier quoted context omitted.

This recommendation would be fine 20 years ago. You should not have any decorative images in your markup, they belong to CSS.

Why? It shouldn't make any difference if you add alt="" to the img tag.

Because you shouldn't be using tags for layout. Nobody does.

Re: Front-End Checklist

#38
post #26

These are very subjective, I've never done half of the 'high' priority items, and I've never had any issues with my site having a 'disfunction'. Take this list with a gigantic grain of salt. For example, your site certainly won't break from missing the 'lang' attribute.

submit a pull request

Re: Front-End Checklist

#40
Seems like this could be presented without as much clutter. Not really useful at a glance for a checklist. Also, some of the info isn't well researched and lacks citations for claims as others have mentioned.

One would be better off just using the Google Web Starter kit[1], other boilerplate options, or just chrome dev tools running Audits to get started with a solid front-end.

[1] https://developers.google.com/web/tools/starter-kit/

Post reply on HN