GithubHelp home page GithubHelp logo

Comments (5)

jeffturcotte avatar jeffturcotte commented on May 19, 2024

Can you supply an example document where a particular browser does not render the page correctly without the full/traditional mime-type meta tag? (either over HTTP or by loading a file)

from boilerplate-archived.

davetufts avatar davetufts commented on May 19, 2024

Good points Matt, but there are so many other things that are more important. Handbook says "HTML pages should begin with by setting utf-8 in the content-type meta tag." Either the long form or short form accomplish that. Boilerplate and the example on Handbook use the short form.

from boilerplate-archived.

mattsah avatar mattsah commented on May 19, 2024

@jeffturcotte, Nope, to my knowledge all browsers (at least the ones we care about) "parse" the first 512 bytes and look for something like a meta tag with the string charset="utf-8" (and other permuations of it). Paul Irish mentioned this in a talk on HTML5 boilerplate, although I don't remember the details, I'm pretty sure you could do something like <meta who cares what thisdsfoihr2 w8eyf8nf923ht98tr information-0ischarset=utf-8youknow> and it would work. If not that exactly, then certainly something not far off.

This, of course, would not validate, but the principle in which it was pulled into the spec was not based on whether it was valid, as clearly the charset attribute for it was not prior to.

@davetufts, there are always things more important in one fashion or another, but I think it's an issue we can address. I would be in favor of defining it more strictly in handbook if one is contingent on the other.

Perhaps I'm overlooking something, but I actually can't find in handbook, for example, where it says we should use self closing tags on elements which do not have a closing tag. Or that we should use closing tags at all. Maybe I'm completely off base, was an actual decision made that whatever is valid is OK to use? I don't recall this always being the case -- perhaps it was defacto the case simply because we used XHTML and that enforced such rules, and by switching to HTML5 we are throwing those good practices out?

from boilerplate-archived.

khamer avatar khamer commented on May 19, 2024

I agree with Dave – there are more important things to worry about. We are staying consistent with bigger, more popular boilerplates like h5bp and Twitter Bootstrap. There's no rule that forces the use of the long or short form, so feel free to use either, but we might as well leave the short form in Boilerplate.

from boilerplate-archived.

jeffturcotte avatar jeffturcotte commented on May 19, 2024

I want to state for the record that @mattsah is correct: the long form is the "right" way and the HTML5 standard got it wrong. Still, as long as boilerplate uses the HTML5 doctype, we will use its bastardized charset meta tag.

from boilerplate-archived.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.