Showing posts with label Module 2. Show all posts
Showing posts with label Module 2. Show all posts

Tuesday, March 6, 2007

HTML Introduction (2.2.4)

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



You put it in <!-- these --> comment tags.. anything you write inbetween will only be shown in your HTML code.

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



You can use the <pre> for preformatted text.
<pre>
 
You can try
some weird
spacing
with
it!
</pre>

3) 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 use the <abbr title="HyperText Markup Language" > This page was written with HTML </abbr>

Or you can use the alt="Your description here " tag for an image or link.

<img src="yourimage.jpg" alt="your description">

Girl in a saree

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



You use the anchor tag.

<a href="#Q7">Go to Question 7. </a>

and on Question 7 I would surround the 7) with these tags -

< a name="Q7"> 7) </a>

5) 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?



In the table tag I would add the following attribute - border="border value"

<table border="3">

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



To link with an image, you use the <a href="yourpagehere.html"> tag and follow it with the <img src="yourimage.jpg"> tag, closing off with the </a> tag.


To control a linked images border properties you add the border="border width" attribute to your <img src > tag.


<img border="3" src="yourimage.jpg" height="136" width="100"> </a>


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



To change the colour of a hypertext link, add the link="any color" attribute to the
<body> body tag.

<body link="green">

To change the background colour of a page, add the bgcolor="any color" background colour attribute to the <body> tag.

< body bgcolor="navy">

Web design basics (2.2.3)

I already felt very confident with my basic Web coding skills, so I quickly scanned the reccomended reading (NCSA--A Beginner's Guide to HTML) giving each section a quick read - just in case! I felt ready to answer the following questions.

1) What tags make up the basic structure of an HTML document?



The basic tags used are

<html>

<head>

<!-- In the header you can also include internal stylesheets.-->

<title>

<!-- The title you give to your page will show in the title bar of the browser, it is important to give a descriptive name, as most search engines use this information too. -->

</title>

</head>

<body>

<!-- The body section is where most of your content will be, popular tags are <h1> for a header, and <p> for a new paragraph. -->

</body>

</html>

2) What tags do you use to denote a paragraph?



<p> </p>

Although closing the <p> is optional.

3) What is the difference between a paragraph tag and a line break tag? Please illustrate.



A paragraph tag

<p>creates a

double space between lines.</p>



Where as a line break tag


<br>Can be used when you don't want
that double space between your lines.

4) How do you create a bulleted list?



To create a bulleted list you use the <ul> unnumbered list and <li> list item tags.

    <ul>
  • <li> List something here
  • <li> and here..
  • <li> and here!
</ul>

5) How do you create a numbered list?



To create a numbered list you used the <ol> ordered list and <li> list item tags.

    <ol>
  1. <li> You can number your lists
  2. <li> just by using a simple tag.
</ol>

6) There is a title information that appears for Web pages in the title bar of a Web browser, in your bookmarks when you choose to bookmark a site, and as a listing in the search results when you do a search for information using a search enging like Google. How do you provide this very important information in your HTML code? Please show an example.



You put this information in your <title> tag, which you place in the <head> of your html document.

<title> Put your web page title here. Please be descriptive. </title>

7) How do you add an image?



To add an image to your HTML document, use the <img src="your image.jpg"> tag.

For faster loading, it is also a good idea to include height= and width= (matching the height and width of your image) in the img src tag as follows <img src="your image.jpg" height=200 width=75 >

8) How do you add a link?



You add a link using the <a href="yourpagehere.html"> tag, then you type what you would like displayed as linked text (for example if your link pointed to Curtin, you may type somthing like this - Curtin University of Technology and close the link with the </a> tag.

9)How do you make an image a link?



To link with an image, you use the <a href="yourpagehere.html"> tag and follow it with the <img src="yourimage.jpg"> tag, closing off with the </a> tag.


10) Provide the code for an empty table, 3 columns long and 4 rows high.



<table>

<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>

<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>

<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>

<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>

</table>