80.7k views
0 votes
A. Create a HTML document (using the information below) that is nested and contains a definition list that contains an unordered list (The Ingredients, Header Two) and an ordered list (The Procedure, Header Two) and (Note, Header Two) with a paragraph. Your page should contain (Header One) for Baking Procedures.

The Ingredients:  100 g. flour  10 g. sugar  1 cup water  2 eggs  salt, pepper The Procedures: 1. Mix dry ingredients thoroughly. 2. Pour in wet ingredients. 3. Mix for 10 minutes. 4. Bake for one hour at 300 degrees. Notes: The recipe may be improved by adding raisins.

Question 2 Using the HTML file created in Question 1, design an External Cascading Style Sheet (CSS) with the following styles below:

1. Any 3 lines with comments

2. The Body with the following fonts: Arial, Helvetica and Sans Serif

3. Ordered list with italic and underline

4. Unordered list with italic and underline

5. Unordered list with left margin 20 pixels

6. Header one with italic and underline

User Klados
by
8.0k points

1 Answer

5 votes

Final Answer

HTML Document (index.html):

```html

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="UTF-8">

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>Baking Procedures</title>

<link rel="stylesheet" href="styles.css">

</head>

<body>

<h1>Baking Procedures</h1>

<dl>

<dt><h2>The Ingredients</h2></dt>

<dd>

<ul>

<li>100 g. flour</li>

<li>10 g. sugar</li>

<li>1 cup water</li>

<li>2 eggs</li>

<li>salt, pepper</li>

</ul>

</dd>

<dt><h2>The Procedures</h2></dt>

<dd>

<ol>

<li>1. Mix dry ingredients thoroughly.</li>

<li>2. Pour in wet ingredients.</li>

<li>3. Mix for 10 minutes.</li>

<li>4. Bake for one hour at 300 degrees.</li>

</ol>

</dd>

<dt><h2>Note</h2></dt>

<dd>

<p>The recipe may be improved by adding raisins.</p>

</dd>

</dl>

</body>

</html>

```

**CSS Document (styles.css):**

```css

/* 1. Comments */

/* Style for the body */

/* Adjustments for the header one */

body {

font-family: "Arial", "Helvetica", sans-serif;

}

ol {

font-style: italic;

text-decoration: underline;

}

ul {

font-style: italic;

text-decoration: underline;

margin-left: 20px;

}

h1 {

font-style: italic;

text-decoration: underline;

}

```

Step-by-step explanation

In the HTML document, a structure is created with nested elements to represent the baking procedures. The document includes a definition list (`<dl>`) containing two sets of terms and descriptions, representing the ingredients and procedures, respectively. Each set is formatted with an unordered list (`<ul>`) for ingredients and an ordered list (`<ol>`) for procedures. The "Note" section is a simple paragraph (`<p>`). Additionally, the document follows proper semantic HTML5 structure.

In the CSS document, an external stylesheet (`styles.css`) is linked to the HTML file. The styles include comments for clarity. The body is set to use the "Arial", "Helvetica", and sans-serif fonts.

Ordered and unordered lists are styled with italic and underline, providing a visual distinction. The unordered list under "The Ingredients" is indented by 20 pixels using the `margin-left` property.

Finally, the header one (`<h1>`) is styled with italic and underline, ensuring a consistent look for the main header. The use of an external CSS file promotes maintainability and separation of concerns in web development.

User Ivan Chaer
by
8.7k points