+ 1

Guys can a code of html run with html or head or body tags?

thus on the tutorial the codes are written with out these elements

15th Aug 2017, 5:45 PM
Hmmam Babe khuoja
Hmmam Babe khuoja - avatar
7 ответов
+ 2
Yes
15th Aug 2017, 5:46 PM
S C
+ 5
@Sam's "Yes" is a perfect for "omit the optional, leave the details to interpretation". Good enough for you? Good enough for browsers? Sure! Here's some detail anyway. This extends the topic (including links for omittable / optional tags): https://stackoverflow.com/questions/5641997/is-it-necessary-to-write-head-body-and-html-tags There are side-effects/bugs to going rogue: Internet Explorer may construct the wrong DOM, Google SEO can not work for you, even SoloLearn inserts the [Script] and [CSS] tabs before the </head> tag. I've always been fond of thinking those sections help with timing (preload order, what gets separate threads), but when I searched it looks like that's part of a different system.
16th Aug 2017, 1:34 AM
Kirk Schafer
Kirk Schafer - avatar
+ 2
Need the head to contain metadata, stylesheets Body is the root of the DOM
15th Aug 2017, 5:50 PM
S C
0
so why we need them?
15th Aug 2017, 5:48 PM
Hmmam Babe khuoja
Hmmam Babe khuoja - avatar
0
👌 got nothing 😅 but I think I'll sort it out when I go further
15th Aug 2017, 5:52 PM
Hmmam Babe khuoja
Hmmam Babe khuoja - avatar
0
Without doctype and html/head tags doesn't pass the W3C validator
7th Nov 2020, 7:26 AM
David Ordás
David Ordás - avatar
0
This is the minimum valid HTML5 document <!DOCTYPE html> <html lang="es"> <meta charset="utf-8"> <title>.</title> </html>
7th Nov 2020, 7:33 AM
David Ordás
David Ordás - avatar