LAB Part 1

Step 1 – Create the following web page.

<!DOCTYPE html >

html

<head<title> Formatting</title</head>
<body>
<b> I’m tag B </b<br/

<i> I’m tag I </i<br/

<u> I’m tag U </u<br/

<s> I’m tag S</s</br

<strike>I’m tag STRIKE</strike<br/

<blink I’m tag Blink</blink> may have to view in other browsers<br/

Logical tags<br/

<em> I’m tag EM </em<br/

<strong> I’m tag STRONG</strong<br/>
<del> I’m tag DEL</del<br/>

<b<i<u> This text will be Bold, Italic, & Underline</u</i</b>

</body

</html

Step 2 – Save as chp2Lab.html

Step 3 – View both in IE, Chrome, and Mozilla

Creating a Line Break

Browsers automatically wrap text according to the width of the window. To resolve this problem, you will have to use the <br/> tag. There is no close tag for the <br/> tag.

Example:

Text

<br/

<br/

Text

Note: Creates two blank lines between the Text lines.

QUESTIONS

What is the purpose of the following tags? Did all the tags work in all the browsers? If not, identify which tag works in which browser.

<b> -


<i> -


<u> -


<s> -


<strike> -


<blink> -


<em> -


<strong> -

<del> -

Did tag <blink> work in all browsers? If not, which browser did it work in?

Combining tags

You can combine tags but you must follow the rule: “Last one open is the first one closed”

Example:

<b<i<u> This text will be Bold, Italic, & Underline</u</i</b>

Notice the lines don’t intersect.

INCORRECT

<b<i<u> TEXT</b</i</u

Notice the lines intersects each other

LAB Part 2

Step 1: Create the following web page

<!DOCTYPE html

<html>
<head<title> Part 2 Chapter 2</title</head

<body
x<sup>2</sup<br/

H<sub>2</sub>O<br/

I’m normal text<br/>
<big>I’m BIG Text</big<br/

<big<big>I’m double BIG</big</big<br/

<small> I’m the SMALL tag</small<br/

<small<small>I’m double SMALL tag</small</small<br/

&gt – I’m the gt character<br/

lt – I’m the lt character<br/

The dog &nbsp &nbsp &nbsp &nbsp barks<br/>

</body

</html

Step 2 – Save as chp2Lab2.html

Step 3 – View both in IE, Chrome, and Mozilla

Adding extra whitespaces

&nbsp – a non-breaking space. By adding &nbsp in your code allows you to add whitespaces between the <p> tags.

QUESTIONS

What is the purpose of the following tags? Did all the tags work in all the browsers? If not, identify which tag works in which browser.

<sup -

<sub> -


<big -

<small -

&gt -

&lt –

&nbsp –

1.  What did the double <big> tags do to the text?

2.  What did the double<small> tags do to the text?

3.  What is the rule for combining tags?