You are on page 1of 9

Hari Prasath A/L Arumugam (CC091983)

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

Fill in the blanks in each of the following:


a) The _______ element inserts a horizontal rule.
hr
b) A superscript is marked up using the_______ element, and a subscript is marked up using the
_______element.
sup, sub
c) The least significant heading element is_______ and the most significant heading element
is_______.
h6, h1
d) Element_______ marks up an unordered list.
u1
e) Element_______ marks up a paragraph.
p
f) The_______ attribute in an input element inserts a button that, when clicked, resets the contents
of the form.
type = "reset"
g) The_______ element marks up a table row.
tr

h) _______are usually used as masking characters in a password box.


Asterisks
2.3
<h1>Internet and World Wide Web How to Program: Fourth Edition</h1>
<hr>
<p><sub>Welcome</sub> to the world of <sub>Internet</sub> <sub>Programming</sub>. <br>
<sub>We</sub> have provided topical coverage for many <sub>Internet-related</sub> topics.</p>

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:president@whitehouse.gov"> 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:myemail@email.com" >
<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

Identify each of the following HTML5 items as either an element or an attribute:


a) html
element
b) width
attribute
c) href
attribute
d) br
element
e) h3
element
f) a
element
g) src
attribute
2.11

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.

b) HTML5 documents can have the file extension .htm.


True
c) &less; is the character entity reference for the less-than (<) character.
False. &lt; is the character entity for the less-than (<) character.
d) In a valid HTML5 document, <li> can be nested inside either <ol> or <ul> tags.
True
2.12

Fill in the blanks in each of the following:


a) HTML5 comments begin with <!-- and end with_______ .
-->
b) In HTML5, attribute values can be enclosed in_______.
quotes
c) _______is the character entity reference for an ampersand.
&amp;
d) Element________ can be used to make text bold.
strong
2.13

Categorize each of the following as an element or an attribute:


a) width
attribute
b) td
element
c) th
element
d) name
attribute
e) select
element
f) type
attribute
2.14

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">

<h2 style="text-align:center;"><em>Advice for Students</em></h2>


<hr>
<h2>How to Get Good Grades</h2>
<ol>
<li><h3>Obtain the right resources</h3>
<ul>
<li>Get the <em>correct</em> version of the book for your
class.</li>
<li>Have an adequate computer.</li>
<li>Get paper, pens, notebooks (if applicable) and keep
them organized and handy.</li>
</ul>
</li>
<li><h3>Carefully review the syllabus</h3>
<ul>
<li>Make note of any important dates for exams and big
projects.</li>
<li>Know what will be expected of you (assignments,
projects, attendance).</li>
<li>Review the grading scale and the weight each
assignment is worth.</li>
</ul>
</li>
<li><h3>Make an effort</h3>
<ul>
<li>Take time to understand all the material.</li>
<li>Don't skip something you don't understand - the next
section may build on it.</li>
<li>Complete and turn in assignments on time.</li>
</ul>
</li>
<li><h3>Ask</h3>
<ul>
<li>If you have any questions on material or assignments be
sure to ask your professor. </li>
</ul>
</li>
</ol>
</div>

You might also like