Live data from Hacker News

Htmlshell - generate HTML skeletons

htmlshell.com

11–20 of 30 posts

Re: Htmlshell - generate HTML skeletons

#11
post #8

Why do so many people still use redundant HTML tags? The opening and closing body and head tags aren't needed, nether is the closing html tag. It doesn't make that much difference to the page as a whole but it adds another level of indenting to your code and makes it more complicated than it needs to be.

The president of the Federation in Star Trek VI said it best: "Let us redefine progress to mean that just because we can do a thing, it does not necessarily mean we must do that thing." Other than the initial level of indenting, which is basically a non-issue for most people I suspect, there just isn't any reason to omit tags like this. At the same time, they make the markup clearer, and help a reader quickly delinea…

I'm not sure I agree (I too did not know they weren't required any more).

We frequently see things like JavaScript pulled in at the bottom of documents -- the head and body long since stopped having functional impacts, and all they seem to do is make you feel guilty about doing things it seems it's not only pragmatic but perfectly OK to do now.

I guess omitting the outermost HTML tags would disturb me slightly if one wants to keep XML-ish. But then it's always bugged me that XML kind of assumes the "file" has no semantic significance.

Re: Htmlshell - generate HTML skeletons

#12

Why do so many people still use redundant HTML tags? The opening and closing body and head tags aren't needed, nether is the closing html tag. It doesn't make that much difference to the page as a whole but it adds another level of indenting to your code and makes it more complicated than it needs to be.

Exactly how much complexity does a closing tag add?

Re: Htmlshell - generate HTML skeletons

#13
post #12

Why do so many people still use redundant HTML tags? The opening and closing body and head tags aren't needed, nether is the closing html tag. It doesn't make that much difference to the page as a whole but it adds another level of indenting to your code and makes it more complicated than it needs to be.

Exactly how much complexity does a closing tag add?

None, but for something that's attempting to generate very simple markup

  
  
    
    TITLE
Is nicer than

  
  
   
    
    TITLE
   
   
    
    
  

Re: Htmlshell - generate HTML skeletons

#16

Why do so many people still use redundant HTML tags? The opening and closing body and head tags aren't needed, nether is the closing html tag. It doesn't make that much difference to the page as a whole but it adds another level of indenting to your code and makes it more complicated than it needs to be.

>> Why do so many people still use redundant HTML tags?

1. Dinna know you could skip them "legally"

2. Increased readability at nearly no cost

3. Concern that browser "x" will render crap if I skip them.

Re: Htmlshell - generate HTML skeletons

#17
post #12

Earlier quoted context omitted.

Exactly how much complexity does a closing tag add?

None, but for something that's attempting to generate very simple markup TITLE Is nicer than TITLE

The is also optional here.[1]

    
    
    TITLE
Look at that, I saved you another indent.

I think the recent Google Style Guide [2] has made this en vogue, but hipster points for anyone who knew about it before.

[1] http://www.whatwg.org/specs/web-apps/current-work/multipage/...

[2] http://google-styleguide.googlecode.com/svn/trunk/htmlcssgui...

Re: Htmlshell - generate HTML skeletons

#18
post #17

Earlier quoted context omitted.

None, but for something that's attempting to generate very simple markup TITLE Is nicer than TITLE

The is also optional here.[1] TITLE Look at that, I saved you another indent. I think the recent Google Style Guide [2] has made this en vogue, but hipster points for anyone who knew about it before. [1] http://www.whatwg.org/specs/web-apps/current-work/multipage/... [2] http://google-styleguide.googlecode.com/svn/trunk/htmlcssgui...

The character set is also optional if sent as an http header.

http://www.w3.org/TR/REC-html40/charset.html#h-5.2.2

And a supporting talk by paul irish http://paulirish.com/2011/primitives-html5-video/

Re: Htmlshell - generate HTML skeletons

#19
post #17

Earlier quoted context omitted.

None, but for something that's attempting to generate very simple markup TITLE Is nicer than TITLE

The is also optional here.[1] TITLE Look at that, I saved you another indent. I think the recent Google Style Guide [2] has made this en vogue, but hipster points for anyone who knew about it before. [1] http://www.whatwg.org/specs/web-apps/current-work/multipage/... [2] http://google-styleguide.googlecode.com/svn/trunk/htmlcssgui...

Can I still take the hipster points if I never knew that the second html tag was required? I just always assumed that the new spec rolled the doctype and html declaration into the same thing.

Perhaps my HTML5 introduction pitched it that way, or perhaps I just jump to conclusions too easily, but nice to know I've gotten it right, even if only by accident.

Re: Htmlshell - generate HTML skeletons

#20
post #8

Why do so many people still use redundant HTML tags? The opening and closing body and head tags aren't needed, nether is the closing html tag. It doesn't make that much difference to the page as a whole but it adds another level of indenting to your code and makes it more complicated than it needs to be.

The president of the Federation in Star Trek VI said it best: "Let us redefine progress to mean that just because we can do a thing, it does not necessarily mean we must do that thing." Other than the initial level of indenting, which is basically a non-issue for most people I suspect, there just isn't any reason to omit tags like this. At the same time, they make the markup clearer, and help a reader quickly delinea…

Do you need to delineate explicitly? There's a block of meta tags followed by a block of content tags. Quite possibly with whitespace inbetween. I think it's fairly obvious.
Post reply on HN