Skip to content

Module 2: 2.2.2 Exercise: HTML Introduction

04/03/2010

How do you provide invisible information on a Web page that allows you to only provide messages for people who read your HTML code?

Creating comments in your code is easy. All you need to do is:

<!– Write your comments here. The browser will ignore, however anyone you looks at the source code will see this –>


How can you make your text appear on a Web browser exactly as you typed it in your HTML code?

<body>
<p>You will need to first place your text inside body tags anf if you plan on writing a few paragrpahs you should place them in <p></p> tags
</body>

How can you provide additional information in HTML in the form of a small pop up message that is otherwise not apparent if you don’t roll your mouse over it?

You can use the “title” attribute. Not to be confused the <title></title> tag.

<p>If you want this sentence to have a tooltip to appear you when you roll your mouse over an abbreviation, such as URL, you will need to use a tile attribute inside an <abbr title=”Laugh out Loud”>LOL</abbr>.

How can you create a hypertext link that will allow you to link to a specific part of the same page?

You will need to use a named anchor inide the document and create hyperlinks to that name. Click the hyperlink at the top and you will jump to the name. Great for longer html documents

<a href=”#here”>Your link to the name will be here</a>

<a name=”here”>This is where we want to go</a>

If you were to create an empty table of two rows by two columns, what do you need to do to it to show the borders around each empty cell?

<table border=”1″>
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
</table>

How do you turn an image into a hypertext link? How do you influence whether or not such an image has a border?

Place the image source inside an <a href> element. You can set the border attribute to zero.

So the code would look like this:

<a href=”seanpryor.wordpress.com”>
<img border=”0″ src=”image.jpg” title=”my image” alt=”my image” />
</a>

How do you change the colors of your hypertext links? How do you change the background color?

I would use a style in the <head> to create different colours. You can do the same for the background colour or use <body bgcolor=”xxxxx”>

<head>
<style type=”text/css”>
body {bgcolor = purple”}
a:link {color = green}
</style>

Advertisement
One Comment leave one →
  1. Michael permalink
    04/03/2010 2:55 pm

    Oh god this is so 20th century would drive me mad that subject

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.