0% found this document useful (0 votes)
61 views2 pages

LWD Assignment 2

The document contains instructions for formatting text using HTML and CSS: 1) It wraps a poem in <pre> tags to preserve line breaks and spacing when displayed. 2) It applies subscript formatting to the number 2 in a paragraph about water. 3) It uses CSS to set the background color of the document body to yellow.

Uploaded by

Tendai Chigondo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
61 views2 pages

LWD Assignment 2

The document contains instructions for formatting text using HTML and CSS: 1) It wraps a poem in <pre> tags to preserve line breaks and spacing when displayed. 2) It applies subscript formatting to the number 2 in a paragraph about water. 3) It uses CSS to set the background color of the document body to yellow.

Uploaded by

Tendai Chigondo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

1.

Wrap this poem around HTML tags that will preserve all spaces and line breaks when the
element is displayed.

<!DOCTYPE html>
<html>
<head></head>
<body>
<pre>
My Bonnie lies over the ocean.

My Bonnie lies over the sea.

My Bonnie lies over the ocean.

Oh, bring back my bonnie to me.

</pre>

</body>

</html>

2. Apply subscript formatting to the number 2 in the text below.

<!DOCTYPE html>
<html>
<head></head>
<body>
<p>
H<sub>2</sub>O is the scientific term for water.
</p>

</body>

</html>
3. Use CSS to set the background color of the document(body) yellow

4. DenDairy board Website

You might also like