Re:Google HTML/CSS style guide suggests omitting head and bo...
by edflsafoiewq on Tuesday May 21, 2019 @01:34PM
(#19972455)
Put them before the start of the body and they'll go into the head. In
<!DOCTYPE html>
<title>title</title>
<style>body { color: #111; }</style>
<p>content
the title and style elements are both inside the head element.
Re:Google HTML/CSS style guide suggests omitting head and bo...
by JoshMnem on Tuesday May 21, 2019 @02:36PM
(#19973317)
It doesn't seem like a good idea to make HTML more complicated just to save 13 characters per page. It's just one more unclear thing that beginners would have to understand. "These elements go in the <head>" is easier to learn than "Here's a list of elements that have to be put in a specific order, but there is no visual indication that they are different." They will tend get copied/pasted out of tutorials in the wrong order.
Is it correct to put a title element outside of a head element?
"Permitted parents: A <head> element that contains no other <title> element."
"The <title> element is always used within a page's <head> block."
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ti...
Google's style guides aren't very good in general, including Python, which doesn't follow PEP8.