What is an HTML5 metadata element?

Good afternoon everyone

I just realized that this piece of code checks as 100% valid HTML5:

<!doctype html>
<html>
  <title>asd</title>
  <script src="Js.js"></script>
  <script>alert('1');</script>
</html>

MDN claims that the allowed parent elements of the tag are <script>:

Any element that accepts metadata elements, or any element that accepts content phrases. ( source )

I was wondering if anyone knows what a metadata element means? What does the phrase mean?

+3
source share
2 answers

Elements belonging to the metadata content category change the presentation or behavior of the rest of the document, customize links to other documents, or transmit other out-of-band information.

: <base>, <command>, <link>, <meta>, <noscript>, <script>, <style> <title>.

: https://developer.mozilla.org/en/HTML/Content_categories#Metadata_content

, <head> <body>, , HTML5. <html> , HTML5:

<!doctype html>
<title>asd</title>
<script src="Js.js"></script>
<script>alert('1');</script>
+2

All Articles