<head> Element Pflicht?
bearbeitet von
Servus!
> Hallo Matthias,
>
>
> > Doch: [https://dev.w3.org/html5/spec-LC/semantics.html#the-title-element](https://dev.w3.org/html5/spec-LC/semantics.html#the-title-element)
> >
> > >Contexts in which this element can be used: In a head element containing no other title elements.
> >
>
>
> hmm… dann ist aber doch Quatsch von denen zu sagen, <head> wäre optional, oder sehe ich das falsch? Gibt aber dort noch eine Aussage:
>
> *If the title element is null, then a new title element must be created and appended to the head element. Let element be that element. Otherwise, let element be the title element.*
>
> Angehängt am <head> Element würde ich jetzt ausserhalb verstehen oder meinen die doch innerhalb damit?
Optional heißt nur, dass Du das nicht hinschreiben musst. Es wird dann vom Browser erzeugt:
~~~ HTML
<!doctype html>
<!---- <html> wird vom Browser erzeugt! -->
<!---- <head> das auch --->
<title>Dokument ohne html und head</title>
<h1>Überschrift</h1>
~~~
Speicher das mal ab und schau's dir im Chrome Debugger an!
Herzliche Grüße
Matthias Scharwies
--
Einfach mal was von der [ToDo-Liste](https://wiki.selfhtml.org/wiki/Kategorie:ToDo) auf die Was-Solls-Liste setzen.“