Tuesday, March 6, 2007

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>

No comments: