Вы находитесь на странице: 1из 11

Q1.

Real-time communication is preferred over asynchronous


communication. Why?

ANSWER: Asynchronous communication is the exchange of messages, such as


among the hosts on a network or devices in a computer, by reading and
responding as schedules permit rather than according to some clock that is
synchronized for both the sender and receiver or in real time. It is usually
used to describe communications in which data can be transmitted
intermittently rather than in a steady stream.

Real time refers to sensing and responding to external events nearly


simultaneously with their occurrence. Although real time operations are
typically thought of as being fast, this does not necessarily have to be the
case: slow systems can allow slow real time operations, and fast operations are
not necessarily real time.

Most communications between devices within computers (e.g., between the CPU
and disk drives) and between computers and external devices (e.g., modems
and printers) are asynchronous. Asynchronous communications also include
computer-based exchanges of messages for which the participants need not
be available or online at the same time, but, rather, read and respond as their
schedules (and desires) permit. Examples include e-mail, discussion boards and
text messaging over cell phones.

Direct communication, where all parties involved in the communication are


present at the same time is a form of synchronous communication or real time
communication. Examples include telephone conversations and instant
messaging.

In asynchronous communications it is necessary for the receiver to be able to


distinguish between valid data and noise (i.e., random signals). In computer
communications, this is usually accomplished through the use of special bits at
the beginning and end of each message.

Q2. HTML is used to create web pages by a web developer. What is


HTML? Explain the typical structure of an HTML program.

ANSWER:-HTML stands for Hyper Text Markup Language. It is the


predominant markup language for web pages. It provides a means to create
structured documents by denoting structural semantics for text such as
headings, paragraphs, lists etc as well as for links, quotes, and other items. It
allows images and objects to be embedded and can be used to create
interactive forms. It is written in the form of HTML elements consisting of
"tags" surrounded by angle brackets within the web page content. It can
include or can load scripts in languages such as JavaScript which affect the
behavior of HTML processors like Web browsers; and Cascading Style Sheets
(CSS) to define the appearance and layout of text and other material.

Structure of an HTML program

Every HTML program has one simple structure. There are two major
components to the structure of a web site, the "head" and "body". The "head"
provides the title and other information about your web site , while the "body"
provides the information and content. Each of these components are marked
by "tags", which let the computer know where the information is written.
There are two types of "tags", opening tags and closing tags. Opening tags
have one triangular bracket (</>) on each of their two sides, while closing tags
start and end with a triangular bracket and a slash (/)at the beginning. Lastly,
all web sites begin with the tag <html> and close with the tag </html>.

Example:

1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">


2. <HTML>

3. <HEAD>

4. <TITLE>The title of the documents</TITLE>

5. <META NAME="description" CONTENT="This is a


document">

6. <LINK REV="made" HREF="mailto:galactus@htmlhelp.com">

7. </HEAD>

8. <BODY>

9. ... document body

10. </BODY>

11. </HTML>

1. DOCTYPE

It is a so-called DOCTYPE declaration. It is used by SGML tools to detect


what kind of document is being processed. If your document adheres to the
Wilbur standard, the above is what it should look like.

If your document is HTML 2.0 compliant, the DOCTYPE of it


is <!DOCTYPE HTML PUBLIC
"-//IETF//DTD HTML 2.0//EN">

Some HTML editors like to include an arbitrary DOCTYPE


declaration in your documents, even when it is not correct.
2. HTML

Basically, it states that the rest is all HTML, as opposed to some other
language which may use tags within < and > brackets. It can also be used
by servers to see that the document they want to send is actually HTML
and not plain text.

3. HEAD

The head of your document contains information about the document itself.
Nothing within the HEAD section should be displayed in the document window.
The head section must include the TITLE of the document. Head is optionally
contain things like a description, a list of keywords for search engines, and the
name of the program used to create the HTML document. If you arrange all
the information about the document at the top of the document, and all body
tags below, it is obvious for a parser where the header ends and where the
body begins.

4. TITLE

The TITLE tag is the only required tag for the head section. It is typically
displayed in the browser's window title bar, and used in bookmark files and
search engine result listings. For the last two situations, you should make sure
the title is descriptive for the document.

5. META

META tags provide meta information about the document. For example, it can
give a description of the document, indicate when the document will have
expired or what program was used to generate it. There are many possible
META constructs, so please read the section on meta tags in the list of HTML
tags.

6. LINK

A LINK tag provides information about the document relative to the rest of
the site. For example, you can have a LINK tag stating where the table of
contents is, what the next document is or where the style sheet can be found.
This particular LINK tag gives the address of the document's author. Some
browsers allow you to send a comment to this person with one keystroke if this
tag is defined.

9. BODY

The BODY of the document contains the actual information. There may be only
one BODY statement in the document. Some editors incorrectly insert another
BODY statement for each new attribute you want to add to the body, but this
can have unexpected side-effects. Often a document will be part of a set, so it
will use a common style. This style should specify a standard structure for
documents, including navigation aids and standard images..

Q3 How can you resize an image with HTML

ANSWER: Resizing Images

Resize the image by adding width and height commands to our image tag.
Example.

<img src="http://www.computerhope.com/title.gif" width="200" height="85">

Example:

Original:

Using the above source:


Q4. Using appropriate example show the working and various attributes of
<marquee> tag.

ANSWER: HTML provides a special feature which enables us to display


scrolling and animated text in the Web page. This tag is supported by Internet
Explorer , Firefox and Netscape 7 and above. Netscape has its blink tag which
blinks text placed inside this tag, but Internet Explorer does not support blink
tag.Marquee tag to scroll text or image in different directions. The text
placed inside the marquee tag will start scrolling horizontally across the
screen or the web page. Scrolling texts are used to give messages or display
some special announcements to the visitors. Using this we can make some part
of the text stand out than others.

Example for marquee tags:

BEHAVIOR

· ALTERNATE

Example code:

<FONT SIZE="4" FACE="courier" COLOR=blue><MARQUEE WIDTH=100%


BEHAVIOR=ALTERNATE BGColor=yellow>This is an example of an alternating
marquee...</MARQUEE></FONT>

· SCROLL

Example code:

<FONT SIZE="4" FACE="courier" COLOR=blue><MARQUEE WIDTH=100%


BEHAVIOR=SCROLL BGColor=yellow LOOP=3>This is an example of a scrolling
marquee...</MARQUEE></FONT>

· SLIDE

Example code:
<FONT SIZE="4" FACE="courier" COLOR=blue><MARQUEE WIDTH=100%
BEHAVIOR=SLIDE BGColor=yellow>This is an example of a sliding
marquee...</MARQUEE></FONT>

DIRECTION

Example code:

<FONT SIZE="4" FACE="courier" COLOR=blue><MARQUEE WIDTH=100%


BEHAVIOR=SCROLL DIRECTION=RIGHT BGColor=yellow>This is an example
of a marquee scrolling to the right...</MARQUEE></FONT>

SIZING

· HEIGHT / WIDTH

Example code:

<FONT SIZE="4" FACE="courier" COLOR=blue><MARQUEE


BEHAVIOR=SCROLL HEIGHT=25 WIDTH=300 BGColor=yellow>This is an
example of a scrolling marquee</MARQUEE></FONT>

· HSPACE / VSPACE

Example code:

Preceeding text. <FONT SIZE="4" FACE="courier" COLOR=blue><MARQUEE


WIDTH=100% BEHAVIOR=SCROLL HSPACE=15 VSPACE=25
BGColor=yellow>This is an example of a scrolling
marquee</MARQUEE></FONT> Following text.

Q5 How can you insert a movie into a HTML document?


ANSWER: Users can insert a movie into a HTML document using any of the
below examples. It is important to realize that before we use the below
examples that you understand what type of movie you are going to be playing
as well as the browsers that are going to be playing the files. By default a
browser may not have the necessary plug-in to view your movie file.Link to
movie files
Basic embed command
Add movie files using the img tag
Embed command to play QuickTime movies ( .mov )

Link to movie files

Example are different methods of making the video file viewable from the
browser window. The below recommendations it is also recommended you
create a direct download link to the file. This will allow the user to download
the file to their computer if it is unable to be played from within the browser.
Below are examples of direct links for the two video files in this document.

Example HTML code:


<embed src="http://www.computerhope.com/issues/floppy2.avi"></embed>

In this basic example we're simply using the embed command and pointing to
the source of the movie file we wish to play.Basic example and will not display
any type of warning or point the user to a location to download the plug-in if
the video file is not supported.

Q6. Implement Following table:

Section Total Strength Above 85%


17 13 5 88 %age Students
with Distinction Students
with Distinction Students
with Distinction

Sham

X1503 20
91
Ram

Mohan
Roll No.
Name

Y2109 31 None

ANSWER:-

<html>

<body>

<table border=5 cellpading=2 cellspacing=7 align=center width=500>

<tr>

<th> Section</th>

<th> Total Strength</th>

<th> Above 85%</th>

</tr>

<tr><td align=center>X1503</td>

<td align=center>20</td>

<td><table border=5 cellspacing=2 align=center>


<th colspan=3>Student with distinction</th>

<tr>

<th>name</th><th>roll no</th><th>%age</th>

</tr>

<tr>

<td align=center>Mohan</td>

<td align=center>5</td>

<td align=center>88</td>

</tr>

<tr>

<td align=center>Ram</td>

<td align=center>13</td>

<td rowspan=2 align=center>91</td>

</tr>

<tr><td align=center>Sham</td>

<td align=center>17</td>

</tr></table></td>

</tr>
<tr><td align=center>Y2109</td>

<td align=center> 3</td>

<td align=center>NONE</td>

</tr>

</table>

</body>

</html>

Вам также может понравиться