LAB 08 HTML div,dl,dd and dt tags
Lab 08
CINDY BEH XIN YI
AI200259
INSTRUCTION
1. By using
Notepad, type the following text:
<!DOCTYPE html>
<html>
<body>
<div style="background-color:lightblue">
<h3> The div dl, dd, and dt elements </h3>
<p>LAB-08.</p>
</div>
<dl>
<dt>Coffee</dt>
<dd>Black hot drink</dd>
<dt>Milk</dt>
<dd>White cold drink</dd>
</dl>
</body>
</html>
2. Save the file
as lab_8.html.
3. Upload your work into the blog.
QUESTIONS
1. Explain about the HTML code above.
The HTML code above use <div>, <div style= “background-color: lightblue”>, <h3>, <p>, <dl>, <dt>, <dd> tags.
<div> tag is use to divide a section in a HTML document while <div style= “background-color: lightblue> tag is used to put a background color to the section which here is light blue color.
<h3> tag is use for heading 3.
<p> tag is use for paragraph.
<dl> tag define a description list and <dt> defines a term or name in description list while <dd> is define each term name or other description.
2. Write a HTML code to display the output as show as Figure Q2 on the webpage.
Figure
Q2
<!DOCTYPE html>
<html>
<body>
<div style="background-color:lightblue">
<h3> Q2-LAB-08 </h3>
<p>-------------------------------.</p>
</div>
<div style="background-color:yellow">
<dl>
<dt>Coffee</dt>
<dd>Black hot drink</dd>
<div style="background-color:lightgreen">
<dt>Milk</dt>
<dd>White cold drink</dd>
</dl>
</div>
</body>
</html>
3. Make a report and
submit it to the Author.
4. Put your report
and answer to your blog also.



Comments
Post a Comment