One thing that it recommends I want to question. The validator complains, "It is highly recommended that the meta charset tag be the first child of the head tag. Consider moving this tag up so it is immediately after the "head" start tag." It also wants the viewport <meta> tag to follow it, or come soon thereafter.
But what I've read in the HTML5 spec is that the order of items in the <head> may be arbitrary (with the exception of the order of style sheets, as later css rules may override earlier ones), with one exception:
"The element containing the character encoding declaration must be serialized completely within the first 1024 bytes of the document."
See for reference:
https://www.w3.org/TR/html52/document-m ... eclaration
https://www.w3.org/International/questi ... clarations
For perspective, this would mean the following initial HTML would be perfectly okay, because the <meta> charset comes within (specifically, at the end of) the first 1024 bytes that would be received by the browser:
Code: Select all
<!DOCTYPE html>
<html lang=en-us>
<head>
<title>Suscipit adipiscing bibendum est ultricies. At elementum eu facilisis sed odio morbi. Sit amet cursus sit amet. Porttitor leo a diam sollicitudin. Massa sed elementum tempus egestas sed sed risus. Viverra accumsan in nisl nisi scelerisque eu ultrices. Commodo viverra maecenas accumsan lacus vel facilisis volutpat. Nec dui nunc mattis enim ut tellus elementum sagittis vitae. Nulla at volutpat diam ut venenatis tellus in. Vitae semper quis lectus nulla at volutpat diam. Tortor posuere ac ut consequat semper viverra. Nisi scelerisque eu ultrices vitae auctor. Nibh sit amet commodo nulla. Congue quisque egestas diam in arcu cursus euismod quis. Sagittis vitae et leo duis ut. Viverra maecenas accumsan lacus vel facilisis volutpat est velit egestas. Tincidunt lobortis feugiat vivamus at. Lectus magna fringilla urna porttitor rhoncus. In ante metus dictum at. Ornare quam viverra orci sagit</title>
<base href="https://example.com/">
<meta charset=utf-8>