Space character constraint to make </head> optional

HTML5 link indicates :

The end tag of the title element may be omitted if the head element is not followed by a white space or comment.

What does this "space" limit mean? I can only think something like

<title>My Page</title><p>Some stuff.</p>

and

<title>My Page</title>
<p>Some stuff.</p>

no, because implicit tags </head><body>will not surround the newline. But I feel like I'm not in the know. We give an illustrative example.

Thanks everyone!

+5
source share
2 answers

It just means that since comment and space characters can appear inside the head element, they will not explicitly cover the head element.

, , () , , , </head>

.

</title> <!-- foo --> <body>

,

</title> <!-- foo --> </head><body>

</title></head> <!-- foo --> <body>

</head>

+4

( </head>).

:

<head>
    <title>Hello World</title>
<body>
...

, , -, :

<head>
    <title>Hello World</title>
  <body>

:

<head>
    <title>Hello World</title>
<!-- This is a comment -->

( , ), . , HTML. , , .

+1

All Articles