scotthmurray / d3-book

Code examples for “Interactive Data Visualization for the Web”
http://d3book.com
Other
2.41k stars 1.79k forks source link

<html>, <head> and <body> tags are unnecessary #17

Closed abitrolly closed 8 years ago

abitrolly commented 8 years ago

http://alignedleft.com/tutorials/d3/fundamentals lists <html>, <head> and <body> tags in simplest HTML page, but these are in fact unnecessary, so simplest page can be reduced to:

<title>Page Title</title>
<h1>Page Title</h1>
<p>This is a really interesting paragraph.</p>
scotthmurray commented 8 years ago

Well, yes and no. These elements are necessary for HTML, but if you omit them, your browser will simply insert them for you. (That's how necessary they are.) :-)

abitrolly commented 8 years ago

Indeed. DOM model shows that these are inserted.