3 ms·
What about meta tags (viewport, description, robots), Open Graph tags, and inline styles? Is it correct to put a title element outside of a head element? "Per
by JoshMnem 7y ago
What about meta tags (viewport, description, robots), Open Graph tags, and inline styles?
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/title 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.
- edflsafoiewq 7y agoPut 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.
- JoshMnem 7y agoIt 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.