| Bold, Italic and Underline |
|
1-10 A 1 Discover In the Exercises01 folder, create an HTML file with these elements: </body> Open the file in a browser and explain these styles: font-weight:bold |
|
1-10 Explanation 1: Bold, italic and underline These styles are used to display bold, italic or underlined text:font-weight:bold font-style:italic text-decoration:underline |
|
1-10 Example 1: The bold, italic and underline styles The bold, italic and underline styles can be applied in the opening tags of
HTML tag pairs such as <h1></h1>, <h2></h2> and so on,
the paragraph tag pair: <p></p>, or the span tag pair: <span></span>.
The following three examples demonstrate how to apply these styles to the opening
tag of the span element:
|
|
1-10 Explanation 2: Several styles for a single style-attribute Bold, italic and underline style declarations can be combined to create a single style attribute. |
|
1-10 A 2
Using the span tag, create an HTML file that shows this content: HTML pages have been designed with the help of experts , so that they may be written in many different languages, with different characters. |
|
1-10 B 1
Create an HTML file that shows the content below. Use the Verdana type for the text of the last item.
|
1-10 A 3
StarfruitJuice09.html
At this point you have 2 identical files, named StarfruitJuice08.html and StarfruitJuice09.html.
|
|
1-10 A 4
Using these styles: create an HTML file that shows the list below:
|
1-10 A 5 Discover
<html> <ol style="font-family:Arial;font-size:115%;list-style-type:lower-alpha;"> </body>
Explain the margin-bottom:10px; style declaration here: |
|
1-10 Explanation 3: Distance between list items With n being the number of pixels, the margin-bottom:npx style declaration can be used to set the distance between list items: <li style="margin-bottom:npx;">List item 1</li> |
|
1-10 Orientation 2: Adjusting practice files' property values For the next three exercises, modify the latest HTML files from previous exercises according to the instructions provided. Adjust the property values for the color, font-size, font-family, font-weight, font-style, and text-decoration properties to style the text. You can add extra text. |
|
1-10 B 2 VegetablesAndFruits Modify the VegetablesAndFruits file by adjusting the property values for the color, font-size, font-family, font-weight, font-style, and text-decoration properties. |
|
1-10 B 3 DreamsAndReality Modify the DreamsAndReality file by adjusting the property values for the color, font-size, font-family, font-weight, font-style, and text-decoration properties. |
|
1-10 B 4 Your own HTML file Modify your own HTML files by adjusting the property values for the color, font-size, font-family, font-weight, font-style and text-decoration properties. |
|
1-10 A 6 Rereading the yellow sections Now that you have gone through the exercises on this page, reread the yellow sections. |
1-10 A 7
StarfruitJuice10.html
At this point you have 2 identical files, named StarfruitJuice09.html and StarfruitJuice10.html.
To modify StarfruitJuice10.html to make it look like this,
apply these styles:
|
|
1-10 A 8
What might be the reason for not including a specific style in the code of the last list item of the Ingredients list of StarfruitJuice10.html? |
|
1-10 Submit 1: Study motivation |
|
This page was created by Hanspeter Amend
|
|
|
Solution proposals 1-10 A 2 <html> <span style="font-weight:bold;text-decoration:underline;">HTML pages</span> have been designed <span style="font-style:italic;text-decoration:underline;">with the help of experts</span>, so that they may be written in many <span style="font-style:italic;font-weight:bold;text-decoration:underline;">different languages</span>, with <span style="font-style:italic;font-weight:bold;text-decoration:underline;">different characters</span>. </body> 1-10 B 1 <html> <ol style="list-style-type:lower-roman;"> </body> 1-10 A 3 <html> <! Title: Set style attribute for text style. > <! Line break > <! Paragraph > <! Set heading > <! Set style attribute for font styles. > <! Set style attribute for list style and font styles. > </html> 1-10 A 4 <html> <ol style="font-family:Arial;font-size:115%;list-style-type:lower-alpha;"> </body> 1-10 A 7 <html> <!- - Set style attribute for the color style of the page background. -
-> <!- - Title: Set style attribute for text style. - -> <!- - Line break - -> <!- - Paragraph - -> <!- - Set heading - -> <!- - Set style attribute for font styles. - -> <!- - Set style attribute for list style and font styles. - -> <!- - Ordered list. Set style attributes for font
styles and for spacing style between list items.- -> <html> 1-10 A 8 In this list, the margin-bottom property defines the distance between the list items. There is no need to define a distance after the last list item, as it doesn't affect the overall appearance of the list. Omitting this extra margin helps maintain a clean and concise look, ensuring that the list appears visually balanced without unnecessary spacing. |
|