Assignment 1
Assignment 1
Assignment 1
INTERNET PROGRAMMING
ASSIGNMENT 1
2.1
State whether each of the following is true or false. If false, explain why.
a) An ordered list cannot be nested inside an unordered list.
False. An ordered list can be nested inside an unordered list and vice versa.
b) Element br represents a line break.
True
c) Hyperlinks are denoted by link elements.
False. Hyperlinks are denoted by a elements
d) The width of all data cells in a table must be the same.
False. You can specify the width of any column, either in pixels or as a percentage of the table
width.
e) Youre limited to a maximum of five internal links per page.
False. You can have an unlimited number of internal links.
2.2
2.4
a) <!-- img src="images.jpg" alt="File Doesn't Exist" height="400" width="300">
b) <!-- img src="images.jpg" alt="File Doesn't Exist" height="300" width="225">
c) <!-- img src="images.jpg" alt="File Doesn't Exist" height="150" width="300">
2.5
a) <!-- Click <a href = "files\abc.html"> here </a> to go to ABC webpage.
b) <!-- Click <a href = "files\text\abc.html"> here </a> to go to ABC webpage.
c) <!-- Click <a href = "../other/abc.html"> here </a> to go to ABC webpage.
d) <!-- Click <a href = "mailto:[email protected]"> here </a> to email to the President.
e) <!-- Click <a href=ftp:// ftp.cdrom.com/pub/README.txt > here </a> to download the file.
2.6
<ol>
<li>Ice Cream
<ul>
<li>Peanut Butter</li>
<li>Cookies -n- Cream</li>
<li>Butter Pecan</li>
</ul>
</li>
<li>Soft Serve
<ul>
<li>Strawberry</li>
<li>Chocolate</li>
<li>Vanilla</li>
</ul>
</li>
<li>Frozen Yogurt
<ul>
<li>Cappuccino</li>
<li>Raspberry</li>
<li>Banana</li>
</ul>
</li>
</ol>
2.7
<a href="mailto:[email protected]" >
<img src="images.jpg" alt="link image">
</a>
2.8
<ol>
<li><a
<li><a
<li><a
<li><a
<li><a
</ol>
href="http://www.google.com">google</a></li>
href="http://www.facebook.com">facebook</a></li>
href="http://www.youtube.com">youtube</a></li>
href="http://www.uniten.edu.my">uniten</a></li>
href="http://www.live.com">msn</a></li>
2.9
<ul>
<li><a href="examples/exr1.html"><b>exr1</b></a></li>
<li><a href="examples/exr2.html">exr2</a></li>
</ul>
2.10
State which of the following statements are true and which are false. If false, explain why.
a) A valid HTML5 document cannot contain uppercase letters in element names.
False. Uppercase letters in element names is a syntax error.
Create the HTML5 markup that produces the table shown in Fig. 2.18. Use <em> and
<strong> tags as necessary. The image (camel.png) is included in the Chapter 2 examples
directory.
=>
<table style="text-align: left; border: 1px solid black">
<thead>
<tr>
<th style=" border: 1px solid black">
<h1>Objectives</h1>
<ul>
<li>To be able to create tables with rows and columns of data.</li>
<li>To be able to control the display and formatting of tables</li>
<li>To be able to create and use forms.</li>
<p>
<em> Yea, form the table of my memory I'll wipe way all trivial fond records.
</em>
<br>
<strong>William Shakespeare</strong>
</p>
</ul>
</th>
<th style=" border: 1px solid black">
<img src="camel.png" alt=" camel image"/>
</th>
</tr>
</thead>
</table>
2.15
Write an HTML5 document that produces the table shown in Fig. 2.19.
=>
<h1>Table Example Page</h1>
<table>
<tbody><tr><td>Here is a small sample</td></tr>
<tr><td style="text-align: center;">table</td></tr>
</tbody></table>
<table border="1">
<thead>
<tr>
<th colspan="2">This is the table head</th>
</tr>
</thead>
<tfoot>
<tr>
<th>This is the table</th>
<th>foot.</th>
</tr>
</tfoot>
<tbody>
<tr>
<td colspan="2">This is the table body</td>
</tr>
</tbody>
</table>
2.16
A local university has asked you to create an HTML5 document that allows prospective college
students to provide feedback about their campus visit. Your HTML5 document should contain
a form with text fields for a name and e-mail. Provide checkboxes that allow prospective
students to indicate what they liked most about the campus. The checkboxes should include:
campus, students, location, atmosphere, dorm rooms and sports. Also, provide radio buttons
that ask the prospective students how they became interested in the college. Options should
include: friends, television, Internet and other. In addition, provide a text area for additional
comments, a submit button and a reset button. Use post to send the information in the form
to http://www.deitel.com.
=>
<form method="POST" action="http://www.deitel.com" >
<label>Name</label>
<input type="text" placeholder="name"> <br><br>
<label>E-mail</label>
<input type="email" placeholder="email"> <br><br>
<input type="checkbox"><label>test1</label><br>
<input type="checkbox"><label>test2</label><br>
<input type="checkbox"><label>test3</label><br>
<br><br>
<!-- radio should be here -->
<label>How did you became interested in this college?</label>
<select>
<option>friends</option>
<option>television</option>
<option>Internet</option>
<option>other</option>
</select><br><br>
<label>
Comment
</label> <br>
<textarea>
</textarea> <br><br>
<input type="submit" >
</form>
2.17
Create an HTML5 document titled How to Get Good Grades. Use <meta> tags to include a
series of keywords that describe your document.
=>
<div class="header">
<table class="logotable">
<tbody><tr>
<td><img src="./2.17 - How to get good grades_files/frostylogo.png" alt="frosty state logo" height="150" width="119"></td>
<td>
<h1>Frosty State University</h1>
<h2><em>Home of the Brewers</em></h2>
</td>
</tr>
</tbody></table>
</div>
<div class="mainbody">