This forum is now read-only. Please use our new forums! Go to forums
It tells me that my "</head> tag needs to come before your <body> tag!"
Answer 55ac017ad3292f8bcc0003cb
I think it is better, if one understands the concept.
It all start’s with you, using a Browser in which you load a HTML-file, which we will call the HTML-Document.
This document has a minimal build of
<!DOCTYPE html>
<html>
<head>
<title> </title>
</head>
<body>
<!-- Here you place your displayable HTML-code -->
</body>
</html>
The Browser =load’s= this document into Memory in a pattern that is described as the Document Object Model in short the DOM. ( the interpretation of the DOM is Browser & Version specific )
html
|
+-----+------+
| |
head body
|
title
In the description of your document in DOM-talk… you will encounter terms like: parent children sibling descendants ascendants…
The HTML-Element has no parent but is a parent to 2 child-Element’s the ‘head’-Element and the ‘body’-Element.
The ‘head’- and ‘body’-Element, both being children to the ‘html’-Element are siblings to each-other.
The ‘head’-Element is parent to the ‘title’-Element… the ‘title’-Element is a child of the ‘head’-Element the ‘title’-Element is also a descendant of the ‘html’-Element.
The DOM has several interface‘s over which you can access the data**/**information held by the DOM.
One of the interface‘s is the Element-interface you can divide the interface into properties ( consisting of a property-key and it’s associated VALUE ) and methods ( giving you the functionality to manipulate the Elements ) https://developer.mozilla.org/en-US/docs/Web/API/Element
Answer 55ac041b9113cbdc120000ff
google search == the Book == jquery [your question] site:developer.mozilla.org CSS [your question] site:developer.mozilla.org javascript [your question] site:developer.mozilla.org [your question] site:jquery.com [your question] site:getbootstrap.com
== discussions / opinions == jquery [your question] site:stackoverflow.com CSS [your question] site:stackoverflow.com javascript [your question] site:stackoverflow.com
== guidance == www.crockford.com [your question] site:crockford.com
http://stackoverflow.com/questions/1795438/load-and-execution-sequence-of-a-web-page
Answer 55aeaa5ae39efe1d7c000013
If you are working with Tag selectors you must be able to read the index.html-document following the guide-lines of the DOM Document Object Model.
html
|
+ - - - - + - - - - +
| |
head body
| |
+ - - - + +- - - +- - - +
| | | | |
link title p div p
(intro) | (summary)
|
+ - - - + - - - - +
| |
p ul
(synopsis) |
|
+ - - - + - - - - +
| | |
li li li
| | |
p p p
The p-Tags are located:
html > body > p (2)
html > body > div > p (1)
html > body > div > ul > li > p (3)
p as selector we have selected all 6 p-Tag's
body > p as selector we selected 2 p-Tags ==> Intro & Summary
div > p as selector we have selected 1 p-Tag ==> Synopsis
li > p as selector we have selected 3 p-Tags under the ul-Tag
Some reference-material: https://developer.mozilla.org/en-US/docs/Web/CSS/Reference
https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes
3 comments
Could I ask you another question?
Sure..why not ??
Here is my question: I have finished the “Sun, Earth, and Code” section, and I wanted to had more planets and moons. I have added the Earth’s moon, but how can I make it rotate around the Earth and he sun at the same time? Here is the link to the codebit: https://www.codecademy.com/KINGALEXD/codebits/cPpMfL Alex
Answer 55b83f5f9113cb87280003b8
1 comments
Thanks Leon, P.S. Your solar system is COOL!
Popular free courses
- Free Course
Learn SQL
In this SQL course, you'll learn how to manage large datasets and analyze real data using the standard data management language.Beginner friendly,4 LessonsLanguage Fluency - Free Course
Learn JavaScript
Learn how to use JavaScript — a powerful and flexible programming language for adding website interactivity.Beginner friendly,11 LessonsLanguage Fluency - Free Course
Learn HTML
Start at the beginning by learning HTML basics — an important foundation for building and editing web pages.Beginner friendly,6 LessonsLanguage Fluency
2 comments
Thank you Leon, You really helped me a lot. What help me the most is when you mentioned the terms parent, children, sibling, descendants, ascendants and how it relates to the DOM. Thank you again, Alex
Thanks.