Exercise: Attributes


1. Open Notepad and type the following text:


<!DOCTYPE html>
<html>
<head>
<title>Attributes</title>
<head/>
<body>
<h2>Attributes</h2>
<p>Background colour of paragraph one is red.</p>
<p>Background colour of paragraph two is yellow.</p>
</body>
</html>


2. Inside the <h2> heading tag, for attributes, add a title attribute with the value "HTML is fun!"

3. Inside the <p> tag, for paragraph one, add a background colour red using the inline style attribute.

4. Inside the <p> tag, for paragraph two, add a background colour yellow using the inline style attribute.











Website Displays

Attributes

Background colour of paragraph one is red.

Background colour of paragraph two is yellow.

Note: Place your mouse on the word 'Attributes' and you will see the title value 'HTML is fun!'