The Building Blocks of the web
++ There is not website without HTML. Learn HTML and build websites and + web applications +
+diff --git a/images/DOM-tree.png b/images/DOM-tree.png new file mode 100644 index 0000000..eeab2d9 Binary files /dev/null and b/images/DOM-tree.png differ diff --git a/images/html-inline-style.png b/images/html-inline-style.png new file mode 100644 index 0000000..5959d6f Binary files /dev/null and b/images/html-inline-style.png differ diff --git a/images/simple-web-page-1.png b/images/simple-web-page-1.png new file mode 100644 index 0000000..418103c Binary files /dev/null and b/images/simple-web-page-1.png differ diff --git a/readme.md b/readme.md index d95eac7..d5fcb04 100644 --- a/readme.md +++ b/readme.md @@ -27,8 +27,20 @@ - [Exercise](#exercise) - [Day 3](#day-3) - [DOM](#dom) - - [Block Elements](#block-elements) + - [Heading Elements](#heading-elements) + - [Paragraph Element](#paragraph-element) + - [Section Element](#section-element) + - [Header Section](#header-section) + - [Main Section](#main-section) + - [Footer Section](#footer-section) + - [Inline Style](#inline-style) + - [Exercise](#exercise-1) +- [Day 4](#day-4) + - [Blocking and Non-blocking Elements](#blocking-and-non-blocking-elements) +- [Day 5](#day-5) - [HTML5 Semantic Elements](#html5-semantic-elements) +- [Day 5](#day-5-1) + - [HTML5 Semantic Elements](#html5-semantic-elements-1) | # Day | Topics | | ----- | :----------------------------: | @@ -354,6 +366,376 @@ Comment in any programming language help a code to be more readable. Therefore, ## DOM -## Block Elements +In this section, we will start writing the DOM tree of an HTML document or file. DOM stands for Document Object Model. The DOM is structure like a true. It starts with an _html_ root element followed by head and body. The head and the body are the immediate children of the root element, _html_. +Create folder on the desktop and give it any name and even you may call it (30DaysOfHTML), inside this folder create an index.html file. Every HTML file has to end with .html extension. And it is good to have at least on index.html file in the project and the reset of the file will have different names. + +Before the root element, there is a declaration. This declaration tells the browser that the document is an HTML. Therefore, the browser render it to the way an HTML suppose to be rendered. +This is the code to declare an HTML. + +```html + +``` + +This a simplistic DOM structure that contains _html_, _head_, _title_, _body_, _h1_ elements. + +```html + + +
++ There is not website without HTML. Learn HTML and build websites and web + applications +
+ + +``` + +Now, there are six elements in the above HTML code. An HTML element may have a parent, a child, sibling(s). The _html_ element is the root or the parent of the _head_ and _body_. The _head_ and _body_ are children of the _html_ tag.The _head_ and _body_ are siblings. The _title_ is the child of the _head_. The body has two children, the h1 and p. + +### Section Element + +If we went to create section for our page, we can use div or section element. Section element has semantic meaning. +Let's add div in the previous page. + +```html + + + ++ There is not website without HTML. Learn HTML and build websites and web + applications +
++ There is not website without HTML. Learn HTML and build websites and web + applications +
++ There is not website without HTML. Learn HTML and build websites and web + applications +
++ There is not website without HTML. Learn HTML and build websites and web + applications +
++ There is not website without HTML. Learn HTML and build websites and + web applications +
++ There is not website without HTML. Learn HTML and build websites and + web applications +
++ There is not website without HTML. Learn HTML and build websites and + web applications +
++ There is not website without HTML. Learn HTML and build websites and + web applications +
++ There is not website without HTML. Learn HTML and build websites and + web applications +
+