+ 1
Questions About Coding in HTML
Why do we need a <head></head> if we can just put <p></p>? Why do we have <!DOCTYPE HTML> when we have <html></html>? And what purpose does it serve? Is it important?
3 Respuestas
+ 2
Yes,they are very much important.
The <head> element is a container for all the head elements can include a title for the document, scripts, styles, meta information etc.
<!doctype HTML> is needed to define html5 document.
Visit the link to know more about doctype!
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd
0
The head contains istructions which helps browsers to understand and display the code. Aside of that there are also info for search engines which help them to index the site
0
All the tags define how the page is represented...
You wouldn't say something is a book because there a bunch of words next to each other. You would want a cover, a summary, chapters, paragraphs...
Would be super hard to read...