Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Is there any real reason for the body and html close tags (and head for that matter), other than to fit in with the rest of the syntax? Like something you'd want to put after the body, but still within the html tag?

  <html>
    <head>
      Here's our head
    <body>
      Here's our body


There isn't even a need for the <head> and <body> tags at all. This is valid HTML 4.01 Strict:

  <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
  <html lang="en">
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <title>Here's our title</title>
    <link rel="stylesheet" href="stylesheet">
    <p>Here's our body
And this is valid HTML 5:

  <!DOCTYPE html>
  <html lang="en">
    <meta charset="utf-8">
    <title>Here's our title</title>
    <link rel="stylesheet" href="stylesheet">
    <p>Here's our body
(From http://meiert.com/en/blog/20080429/best-html-template/ )




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: