| Simplified HTML structure. Colors. |
|
1-6 Explanation 1: Simplified structure of an HTML document Every HTML document consists of an opening and closing HTML tag that encloses a body tag pair: <html> <body> </body> </html> |
|
1-6 Definition 1: The HTML tag pair This tag pair: <html></html> is called the HTML tag pair. |
|
1-6 Explanation 2: The HTML tag pair The <html></html> tag pair is used to mark the beginning and end of an HTML document:<html> |
|
1-6 Explanation 3: The overall content of the HTML document All content of an HTML document is enclosed in the HTML tag pair. |
|
1-6 Definition 2: The body tag pair This tag pair: <body></body> is called the body tag pair. |
|
1-6 Explanation 4: The body tag pair The body tag pair is written within the HTML tag pair, as follows:<html> <body> </body> </html> |
|
1-6 Explanation 5: Content enclosed in the body tag pair The content enclosed in the body tag pair of an HTML page is displayed when the page is opened in a browser. |
|
1-6 Example 1: The HTML and body tag pairs In this example, This is a little text. is written within the body tag pair of an HTML page. The text will be displayed when the page is opened in a browser:<html> <body> This is a little text. </body> </html> |
|
1-6 Orientation 2: Including the HTML and body tag pairs To keep introductory explanations simple, the HTML and body tag pairs were omitted so far. But from now on they must be included in each HTML document. |
|
1-6 Explanation 6: Simplified structure to build a new HTML document When you build a new HTML document, it is crucial to first start with this structure:<html> <body> </body> </html> You should only begin writing code inside the body tags after you have completely written the simplified HTML structure. |
|
1-6 A 1 When building a new HTML page...
|
|
1-6 Orientation 3: Summary of initial steps to build a new HTML file The following section lists previous sections on how to build a new HTML file. Re-read:
|
|
1-6 Explanation 7: Initial steps to build a new HTML file When you build a new HTML file, follow these initial steps:
|
|
1-6 A 2
Create an HTML file that displays this text: Various animalsThere are different types of animals. They can be classified into various groups. Each group contains species with unique characteristics. Animals living in airSome animals, such as birds and bats, live in the air. This group includes mammals, birds and reptiles. Animals living in waterOthers, like fish, live in water. Each of these groups has unique characteristics. |
|
1-6 A 3 Discover In the Exercises01 folder, create an HTML file with these lines of code: </html> Open this file in a browser and explain what <body style="background-color:yellow;"> will show: |
|
1-6 Explanation 8: The background color of an HTML page To set the background color of an HTML page, use:<html> <body style="background-color:value;"> … </body> </html> If this style is not set, then the value of the background color property will default to 'white'. |
|
1-6 Orientation 4: Copies of previous files For the following exercises, make a copy of each of the following files in the Exercises01 folder:
Use the copies for the following exercises and save them with the corresponding new names. |
|
1-6 A 4 Dogs Update the dogs file with the simplified HTML structure and a background color. Also, adjust font colors. |
|
1-6 A 5 Decide if the following steps to start writing a new HTML page are right or not.
|
|
1-6 A 6 Cats Update the cats file with the simplified HTML structure and a background color. Also, adjust font colors. |
|
1-6 Explanation 9: Background colors and texts When working with colored texts and backgrounds, be mindful of bright background colors that display dark fonts, and ensure those with a dark background color display bright fonts, so all texts are easy to read. |
|
1-6 A 7 Birds Update the birds file with the simplified HTML structure and a background color. Also, adjust font colors. |
|
1-6 Explanation 10: Use of color for reading Use colors that work well together and are balanced for a pleasant reading experience. You can use contrasting colors to highlight important parts of the text. |
|
1-6 A 8 Music Update the music file with the simplified HTML structure and a background color. Also, adjust font colors. |
|
1-6 A 9 Games Update the games file with the HTML structure and a background color. Also, adjust font colors. |
|
1-6 A 10 Your own HTML files Update your own files with the simplified HTML structure and a background color. Also, adjust font colors. |
|
1-6 Orientation 5: Previous files The next few exercises refer to files you have created for exercises on page 5. |
|
1-6 A 11 VegetablesAndFruits Update the Vegetables and Fruit file with the simplified HTML structure and a background color. Also, adjust font colors. |
|
1-6 A 12 DreamsAndReality Update the DreamsAndReality file with the simplified HTML structure and a background color. Also, adjust font colors. |
|
1-6 A 13 BooksAndMovies Update the BooksAndMovies file with the simplified HTML structure and a background color. Also, adjust font colors. |
|
1-6 Orientation 6: Review of style terms I The following exercises are a review of style terms described on page 3. |
|
1-6 A 14 <h1 style= "text-align:right;color:yellow;">This is a little text.</h1> Decide, if the following statements about the above line are true or false. In the above line…
|
|
1-6 Orientation 7: Review of style terms II If you wish to review some of the terms from the previous exercise, refer to page 3. |
|
1-6 B 1 HTML file with your own text Create an HTML file with any text you like. Use all tags and tag pairs you have learned so far, along with headings and colors. |
|
1-6 A 15 Rereading the yellow sections
Now that you have gone through the exercises on this page, reread the yellow sections. |
1-6 A 16
StarfruitJuice06.html
At this point you have 2 identical files, named StarfruitJuice05.html and StarfruitJuice06.html.
|
|
This page was created by Hanspeter Amend
|
|
|
Solution proposals 1-6 A 2 <html> <body> <!-- Title --> <!-- Section 1 --> <!-- Section 2 --> </body> </html> 1-6 A 16 <html> <!- - Set style attribute for the color style of the page background. -
-> <!- - Title: Set style attribute for text style. - -> <!- - Line break - -> <!- - Paragraph - -> <!- - Set heading - -> </body> </html> |
|