Home Work 2 Web Programing
Home Work 2 Web Programing
1. What are lists enumerate ordered and unordered lists using appropriate example
Answer:
Unordered Lists
An unordered list is a list of items. The list items are marked with bullets (typically small
black circles).
An unordered list starts with the <ul> tag. Each list item starts with the <li> tag.
Example :
<ul>
<li>Coffee</li>
<li>Milk</li>
</ul>
•Coffee
•Milk
Inside a list item you can put paragraphs, line breaks, images, links, other lists, etc.
Ordered Lists
An ordered list is also a list of items. The list items are marked with numbers.
An ordered list starts with the <ol> tag. Each list item starts with the <li> tag.
Example:
<ol>
<li>Coffee</li>
<li>Milk</li>
</ol>
1.Coffee
2.Milk
Inside a list item you can put paragraphs, line breaks, images, links, other lists, etc.
Answer:
EXTERNAL HYPERLINK: Hyperlink is a link on a page that connects you to another spot
on the page, a seperate page, or another website. An external hyperlink is a hyperlink that
connects you to another website.
INTERNAL HYPERLINK:
An internal hyperlink is a link which points to a particular part of a page. This can be useful
in long pages with lots of sub-sections. For example, the links at the top of this page are
internal links pointing to each sub-heading.
Internal hyperlinks require an anchor tag with the "name" attribute like so:
Create an anchor like this at the place in the page you want to link to. It doesn't matter if
there is anything between the open and close tags.
Then create a hyperlink which refers to this anchor with a hash (#) like so:
This assumes that the name anchor is on the same page as the hyperlink. To link to an anchor
on a separate destination page, simply create a normal link with the anchor name appended to
the file name like so:
<html>
<title>welcome
</title>
<body bgcolor="green">
</body>
</html>
3. Using appropriate example show the working and various attributes of <marquee>
tag.
Answer:
EXAMPLE OF MARQUEE:
<html>
<body>
</html>
Part-B
1. With the help of suitable example write the steps to create thumbnails and their use
in web programming.
Answer:
Step 2: Upload your picture to your site, and copy down the URL for the picture file. In Step 4,
simply insert this URL in place of the text reading "pictureURL."
Step 3: Access the HTML source code for the page you want to add a thumbnail to. Even if
you're using a specialty program for easier, user-friendly web page editing, you should still be
able to get at the raw HTML code. Depending on the web production software you're using,
accessing the source code requires different steps. In most programs you can press "F1" to access
the help menu for further guidance.
Step 4: Type in the following HTML code, replacing the words "pictureURL" with the exact
URL of the picture you are using: <a href="pictureURL" target="_blank"> <img
src="pictureURL" alt="Resized JPEG graphic" title="Click to view full-sized image" border="1"
width="200" height="200" hspace="10" /></a>
Step 5: Save the page and view it to see your new thumbnail image and associated full-sized
picture link. The thumbnail will be 200 pixels by 200 pixels using the code in Step 4; if you want
a different-sized thumbnail, simply fill in different values under the width and height sections of
the code.
2. How can we insert an image with a specific width & height inside a web page?
Answer:
The src attribute tells the browser where the image file is located. Similar to the <a>, the url can
be absolute or relative. Usually, the file is relative. For example, if you have an image that is
saved as "someimage.jpg" in a directory called "myimages", the image link code would be <img
src="myimages/someimage.jpg" width="#" height="#" alt="some text" />.
First, most browsers, if not all, will either display the image in its original size or guess what the
width and height are, which you may not want. For example, if you have an image with a width
of 500 pixels and a height of 400 pixels, but you want the image appear as having a width of 250
pixels and height of 200 pixels, most browsers will display the image with the original width and
height or 500px by 400px. Also, not specifying the width and height can lead to the web page
downloading slower than if they were specified.
Second, it is necessary to include the alt tag in order for the code to be W3C XHTML standards
compliant.
<html>
<head>
<title>WebDevelopment</title>
</head>
<body>
<p>
<img src="image.jpg" width="80px" height="80px" alt="some text" />
</p>
</body>
</html>
3. Create a web page which shows the role of BR, BLINK and FONT tags.
Answer:
<HTML>
<HEAD>
<TITLE>Text Extensions</TITLE>
</HEAD>
<BODY>
<HR>
<HR>
<BR>
</BODY>
</HTML>