0% found this document useful (0 votes)
17 views6 pages

HTML Assignment

The document provides an overview of computer networks, including definitions and types such as Local Area Network (LAN), Metropolitan Area Network (MAN), and Wide Area Network (WAN). It also explains the HTML <table> tag, its attributes, and examples of inline, internal, and external style sheets. Additionally, it describes different types of dialog boxes in JavaScript: Alert, Confirm, and Prompt dialog boxes.

Uploaded by

openy2102
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views6 pages

HTML Assignment

The document provides an overview of computer networks, including definitions and types such as Local Area Network (LAN), Metropolitan Area Network (MAN), and Wide Area Network (WAN). It also explains the HTML <table> tag, its attributes, and examples of inline, internal, and external style sheets. Additionally, it describes different types of dialog boxes in JavaScript: Alert, Confirm, and Prompt dialog boxes.

Uploaded by

openy2102
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

HTML ASSIGNMENT

Q.1 Explain the term Network and also describe the different types of Network
Ans.
Network is the concept of sharing resources and services
Network of computer is a group of interconnected system sharing resources
using a common communication link.
Shared resource can be data printer, fax modem services such as email and
database.
To complete a network following are main thing which will be required
1. Resource to share
2. Pathway to transfer data (Medium)
3. A set of rules governing the network (Protocol)
Types of Network
There are three main primary categories of network: Local Area Network,
Metropolitan Area Network and Wide Area Network.
Into which category a network falls is determined by its size, ownership,
distance it covers and its physical architecture.
Local Area Network
LAN is usually privately owned and links the devices in a single office,
building or campus.
Depending on the need of an organization and the types of technology used,
LAN can be even of two PCs and Printer in some office or home.
LANs are designed to allow resource to be shared between personal
computers or workstation.
One of computer may be given a large capacity disk drive and may become a
server to the other clients. Software can be stored on this central server and
used as needed by whole group.
In addition to size LAN are distinguished from other types of networks by
their transmission media and topology. Generally LAN uses only one type of
transmission medium and common topology star.
Traditionally LAN have data rates in 4 to 16 megabits per second(Mbps),
however today’s LAN have speed up to 100Mbps to 1Gbps (Gigabits per
seconds).
Metropolitan Area Network
MAN is designed to extend over an entire city. It may be single network such
as cable television network or it may be means of connecting a number of
LANs into a larger network so that resource may be shared to LAN to LAN.
MAN may be wholly owned and operated by a private company, or it may be
service provided by a public company such as local telephone company.
Wide Area Network
It provides long distance transmission of data, voice, image and video
information over large geographic areas that may comprise a country,
continent or even whole world
It contrasts to LANs which depends on their own hardware for transmission.
WAN may utilize public, leased or private communication equipment usually
HTML ASSIGNMENT

in combination and therefore span an unlimited number of miles


WAN that is wholly owned and used by a single company is often referred to as
enterprise network.
Q-2 Explain the table tag in detail with proper example
Table
The <table> tag defines an HTML table. An HTML table consists
of the <table> element and one or more <tr>, <th>, and <td> elements. The <tr>
element defines a table row, the <th> element defines a table header, and the <td>
element defines a table cell. A more complex HTML table may also include
<caption>, <col>, <colgroup>, <thead>, <tfoot>, and <tbody> elements. The "align",
"bgcolor", "cellpadding", "cellspacing", "frame", "rules", "summary", and "width"
attributes are not supported in HTML5.
Attributes
height: width: Sets the height and width for the particular table. It could be
in pixel or in percentage user should use % pattern for the dynamic output.
border: Sets the border of the rows and columns. The value is in pixel only.
The default value is zero and the minimum value is 1.
align: The attribute is used for the alignment of the table left, right and
center are the values.
cellpadding: Sets the space of the text from the starting of cell. The value is
in pixels only.
cellspacing: Sets the space between two cells. The value is in pixel only.
bgcolor: The bgcolor attribute specifies a background color of a table.
rules: Used to display or not to display grids of a table. Values are all, rows,
cols, none
Example:
<html>
<head>
<title>Rowspan & Colspan Tag</title>
</head>
<body>

<table border="2" height="50%" width="50%" align=”center”>


<tr>
<td rowspan="3" bgcolor="blue" align="center">Computer</td>
<td colspan="2" align="center">BCA</td>
</tr>

<tr>
<td>1</td>
<td>2</td>
</tr>

<tr>
<td>3</td>
HTML ASSIGNMENT

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

<tr>
<td rowspan="3" bgcolor="yellow" align="center">Management</td>
<td colspan="2" align="center">BBA</td>
</tr>

<tr>
<td>5</td>
<td>6</td>
</tr>

<tr>
<td>7</td>
<td>8</td>
</tr>

</table>
</body>
</html>
Q.3 Explain the different types of Style Sheets
Ans. Types of Style Sheets

Inline style sheet


When a style is intended for a single place or item on the
entire website, a single tag CSS is used. As the term suggests, a single tag CSS affects
only a single tag in a HTML document for which it is defined. Inline styles are used
for this purpose. In inline style the style attribute must be used in the relevant tag
that renders the style. The style attribute may have any CSS property. The following
example shows how a change in the color and the right margin of a paragraph is
brought which is different from the rest of the page.
<html>
<body>
<p style="color: teal; margin-right: 40px";>
This paragraph has different style </p>
</body>
</html>
<html>
<body style="background-color:#FF00FF">
<h2 style="color:red">
Here goes your paragraph
</h2>
</body>
</html>
HTML ASSIGNMENT

Internal style sheet


When a style is intended to appear at several places on a
single web page, a CSS style is used which is defined once for the entire page.
Internal style sheets (or embedded style sheets) are used for this purpose. Internal
style sheets are also called embedded style sheets.
<html>
<head>
<style type="text/css">
p{color:#FFCC00}
h2{color:#3399FF}
h4,h6{color:#66FF00}
</style>
</head>
<body>
<h2> your first heading </h2>
<p> your paragraph </p>
<h4> your second heading </h4>
<h6> your third heading </h6>
</body>
</html>

External style sheet


The third and the most powerful method of inserting a
style sheet is to link the HTML document to an external style sheet. When a style is
intended to appear at more than one page in the website, a CSS style is used which is
described in an external CSS file. External style sheets (or linked style sheets) are
used for this purpose. External style sheets are also called linked style sheets.
Inserting an external style sheet provides complete ease to the designer and also
save lot of time whereby the designer can change the look of several pages or of the
entire website by making the necessary change in only one file. The external style
sheet is linked to each of the pages with the <link> tag which goes inside the head
section. The following example shows how an external file is linked to a document:
/* CSS Document */
p{color:#FFCC00}
h2{color:#3399FF}
h4,h6{color:#66FF00}

/*Html Web Page */


<html>
<head>
<link href="external.css" rel="stylesheet" type="text/css">
</head>
<body>
<h2> your first heading </h2>
HTML ASSIGNMENT

<p> your paragraph </p>


<h4> your second heading </h4>
<h6> your third heading </h6>
</body>
</html>

In the example save CSS Document with any name having


extension .css, in the Html Web Page ‘external.css’ should be replacing with name of
CSS document where it is been called with the help of <link> tag in the Html
document. The Html page can be saved with any name.
Note: User should note that in type attribute of <style> tag forward slash should be
done, not a back slash “text/css”
Rel attribute defines the relation between the external document and the calling
document. In this case, the relation is that the external document is the style sheet
for the calling document.
Type attribute refers to MIME type of the external file.
Href attribute is same used in <a>, Href stands for hyperlink reference. It accepts
the path of the style sheet document. CSS document ‘external.css’ can be hyperlink
in any number of Html documents, one change to CSS document will affect in every
Html document.

Q.4 Explain the different types of dialog boxes in javascript


Ans. Dialog Boxes
Alert Dialog Box
The Alert dialog box is used to display some textual information on the web
browser. The dialog box will have only one button ‘OK’. The JavaScript and HTML
program will not be continuing processing until the ok button is pressed. Mostly it is
used when user enters some invalid data or some warning is to be displayed.
<html>
<head>
<script language="javascript">
alert("You are in head script");
</script>
</head>
<body>
<script language="javascript">
alert("You are in body script");
</script>
</body>
</html>
Confirm Dialog Box
A confirm box is often used if you want the user to verify or accept something. A
confirm box display the predefine message and ‘OK’ and ‘CANCEL’ button. When
confirm box pops up, the user will have press either ok or cancel to proceed. If the
ok button is pressed it will return true and if the cancel button is pressed it will
HTML ASSIGNMENT

return false
<html>
<head>
<title>
Javascript
</title>
<script language="javascript">
alert("welcome")
if(confirm("do you want to display image as
background"))
document.write("<body
background='friends.jpg'>")

</script>
</head>
<body>
hello every one
</body>
</html>
Prompt Dialog Box
A prompt box is often used if you want the user to input a value before entering a
page. A prompt box display a predefine message, a textbox for user input and
display ok and cancel button. When a prompt box pops up, the user will have to click
on ok or cancel to proceed after entering an input. If the user clicks ok it will return
the value and if cancel is pressed it will return NULL. The prompt is two parts first is
the message to the user and second is default value, which will be returned on by
pressing ok button without changing it.
<html>
<body>
<script language="javascript">
var name = prompt("Enter your name","Firstname")
document.write("Welcome " + name)
</script>
</body>
</html>

You might also like