0% found this document useful (0 votes)
21 views27 pages

Web Technology Revision-Answered

Uploaded by

medosafwat2018
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)
21 views27 pages

Web Technology Revision-Answered

Uploaded by

medosafwat2018
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/ 27

Web Technology Revision

Code & Essay Question:

 Compare between router & switch?


A switch is a device that connects computers to a network. A
switch is a full-duplex device
A router is a special computer that directs communicating
messages when several networks are connected together.

 Compare between HOSTS & NODES?


A client/server network has a host computer, a mainframe or
midsize central computer that controls the network.
The other devices on the network are called nodes. A node is
any device that is attached to a network—for example, a
microcomputer, terminal, storage device, or printer.

 list Components of a Network?


Wired and/or Wireless Connections
Hosts & Nodes
Packets
Protocols

Prepared By: Eng. Abanoub Ibrahim


Bridges & Gateways
Hubs, Switches &Routers
Backbone

Code 1:

Ans:
<!DOCTYPE html>
<html>
<head>
<style>
table,th,td{
border: 1px solid black;

Prepared By: Eng. Abanoub Ibrahim


}
</style>
</head>
<body>
<p>F<sub>1</sub></p>
<p>X<sup>2</sup></p>
<p><u>underlined</u></p>
<table>
<tr>
<th colspan="4">RGB Colors</th>
</tr>
<tr>
<td rowspan="4">
Examples
</td>
<td>black</td>
<td bgcolor="black">black</td>
</tr>

Prepared By: Eng. Abanoub Ibrahim


<tr>
<td>red</td>
<td bgcolor="red">red</td>
</tr>
<tr>
<td>green</td>
<td bgcolor="green">green</td>
</tr>
<tr>
<td>blue</td>
<td bgcolor="blue">blue</td>
</tr>
</table>
</body>
</html>

Prepared By: Eng. Abanoub Ibrahim


Code 2:

Ans:
<!DOCTYPE html>
<html>
<head>
<style>
body{
background-color: orange;
}

Prepared By: Eng. Abanoub Ibrahim


</style>
</head>
<body>
<a href=”#” style=”text-align: center;”> This asdjksadkjsdklaklsd
askjdsakld</a>
<p>Hello, My Name is "write your name here"</p>
<p>My ID is "write your id here"</p>
<p><b>Select your color</b></p>
<pre style="color: blue;"><b><i>#include
int main(){
int number;

printf("enter an integer");
scanf("%d", &number);
printf("you enterd %d",number);
return 0;
}</i></b>
</pre>
<img src="/adsadsa.png" width="100px" height="100px">

Prepared By: Eng. Abanoub Ibrahim


<h3>Welcome to our university</h3>
<a href="www.eelu.edu.eg">EELU</a>
<p>at the <a href="www.eelu.edu.eg">EELU
University.</a></p>
</body>
</html>

Code 3:

Ans:
<!DOCTYPE html>
<html>
<head>

Prepared By: Eng. Abanoub Ibrahim


<style>
body{
background-color: green;
}
</style>
</head>
<body>
<h2>Quiz 1 Soultion</h2>
<p>Hello, My Name is "write your name here" My ID is "write
your id here"</p>
<img src="#" width="150px" height="100px"><br>
<fieldset>
<legend>Student Information</legend>
<form>
<label for="fname">First name:</label><br>
<input type="text" name="fname"><br>
<label for="id">ID:</label><br>
<input type="text" name="id"><br>
<h2>Course Enrollment</h2>

Prepared By: Eng. Abanoub Ibrahim


<p>course 1</p>
<select>
<option>web</option>
<option>Graphics</option>
<option>3d</option>
</select>
</form>
</fieldset>
</body>
</html>

Code4:

Prepared By: Eng. Abanoub Ibrahim


Ans:
<!DOCTYPE html>
<html>
<head>
<style>
.div1{
display: inline-block;
width: 100px;
height: 150px;
background-color:red;
}

Prepared By: Eng. Abanoub Ibrahim


#ddiv{
background-color: blue;
}
</style>
</head>
<body>
<div class="div1">div 1</div>
<div id ="ddiv" class="div1">div 2</div>
<div class="div1">div 3</div>
<br>
</body>
</html>

MCQ & T/F


....................... is a collection of local, regional, national, and
international computer networks that is linked together to
exchange data and distribute processing tasks.
a) Web
b) Internet

Prepared By: Eng. Abanoub Ibrahim


c) Brower
…………………….is the standard set of rules for electronically
addressing and transmitting data over the internet.
a) FTP
b) HTTP
c) TCP/IP
…………………..is a collection of millions of documents that are
accessible through the internet and that are distributed on
millions of computers.
a) WWW
b) Internet
c) Google
………………..is a language that includes a set of tags attached to
text. These tags describe the relationship between text
elements.
a) HTML
b) CSS
c) JavaScript
A bridge is an interface used to connect the same types of
networks.
a) True
b) False

Prepared By: Eng. Abanoub Ibrahim


………………..is a device that connects computers to a network
a) Hub
b) Switch
c) Router
……………….is a special computer that directs communicating
messages when several networks are connected together
a) Hub
b) Switch
c) Router
………………………. an interface used to connect the same types of
networks.
a) Switch
b) Gateway
c) Bridge
d) Hub
A host is any device that is attached to a network.
a) True
b) False
Handshaking establishes the fact that the circuit is available and
operational.
a) True
b) False

Prepared By: Eng. Abanoub Ibrahim


A hub is a full-duplex device
a) True
b) False
The Internet backbone is the main highway where data travels
over the internet.
a) True
b) False
An IP address is a unique number that's assigned to each device
on a network
a) True
b) False
HTML Stands for …………..
a) Hyper Text Malloc Language
b) Hybrid Text Markup Language
c) Hyper Text Markup Language
The <!DOCTYPE> declaration represents the document type,
and helps browsers to display web pages correctly.
a) True
b) False
……………..contains the actual content to be displayed in the
Web page

Prepared By: Eng. Abanoub Ibrahim


a) HTML
b) Head
c) Body
HTML tags are case sensitive?
a) True
b) False
To Write a comment in HTML we use ………..
a) /* write comment here */
b) // write comment here
c) <!-- write comment here -->
Structure of web page is correct?

a) True
b) False
H6 is largest headline?

Prepared By: Eng. Abanoub Ibrahim


a) True
b) False
……… use to Open the document in a new window or tab.
a) _self
b) _blank
c) _parent
d) _new
To make list in HTML use <list> tag
a) True
b) False

What is the output?


<ol type="A">
<li>Apples</li>
<li>Bananas</li>
<li>Lemons</li>
<li>Oranges</li>
</ol>
Ans:

Prepared By: Eng. Abanoub Ibrahim


Write code to do the following:
<body>
<ul type"desk">
<li>coffe</li>
<li>tea
<ul type"circle">
<li>bt</li>
<li>gt</li></ul>
</li>
<li>milk</li>
</ul>
Ans: </body>

<ul type=”disc”>
<li>Coffee</li>
<li>Tea
<ul type=”circle”>
<li>Black tea</li>
<li>Green tea</li>
</ul>
</li>
<li>Milk</li>
</ul>

Prepared By: Eng. Abanoub Ibrahim


Which Syntax is correct to create table:
a) <th></th><tr><td><td></tr>
b) <th></th><td><tr><tr></td>
c) <tr><th></th></tr><tr><td></td></tr>
d) <th><tr></tr></th><td><tr></tr></td>

The <meta> tag always goes inside the body element.


a) True
b) False

What is the Advantages of DHTML?


Ans:
Allow the designer to control how the HTML displays Web
pages’ content.
React and change with the actions of the visitor.
Can hide and show content as needed.

To Insert CSS we use …….


a) External style sheet
b) Internal style sheet

Prepared By: Eng. Abanoub Ibrahim


c) Inline style sheet
d) All of the above

In CSS to set image as background to a HTML element …….


a) background-color
b) background-image
c) background-photo

To Prevent image repeat ……..


a) background-repeat : no repeat
b) image-repeat : no repeat
c) background-repeat : 0
d) image-repeat : 0

To Make the text in center ……….


a) Text-align : center
b) Text-content : center
c) Element : center

Compare between Programming Language and Scripting


Language

Prepared By: Eng. Abanoub Ibrahim


Ans:
Programming Language
Compiled, converted permanently into binary executable files
(i.e., zeros and ones) before they are run.
e.g. C,C++..
Scripting Language
Interpreted command by command, and remain in their
original form.
e.g. JavaScript.

Which is can NOT do using JavaScript…….


a) open and create new browser window
b) Validating the user's input data.
c) Insert data to database
d) Can handle events.

To change content of HTML element ……..


a) document.getElementById("elemntid”).innerHTML = “Text
here”
b) Document.getElementById("elemntid”).changeText =
“Text here”

Prepared By: Eng. Abanoub Ibrahim


c) Document.getElementById("elemntid”).changeContet =
“Text here”
d) All of the above

Where can write JavaScript Code ………….


a) head
b) body
c) external file
d) All of the above

To display pop-up window………


a) Document.write();
b) Document.alert();
c) alert();
d) None of the above

To declare Decimal variable in JavaScript use ……..


a) Int
b) Double
c) Decimal
d) None of the above

Prepared By: Eng. Abanoub Ibrahim


In this code z is ………..

a) Local scope
b) Global scope
c) Undefined

To Write a single line comment in Javascript we use ………..


a) /* write comment here */
b) // write comment here
c) <!-- write comment here -->

All JavaScript identifiers are case sensitive


a) True
b) False

Prepared By: Eng. Abanoub Ibrahim


What is the output
var a = 10;
var b = '10’;
var c = 10;
console.log(a===b);
console.log(a===c);
a) False,True
b) True,False
c) True,True
d) False,False

What is the output?


<script>
Var temp=120
Var newvar=(temp>100) ? ”red” : “blue”
temp=20
newvar=(temp>100) ? ”red” : “blue”
document.write (newvar);
</script>
a) red
b) blue
c) red , blue
d) blue , red

Prepared By: Eng. Abanoub Ibrahim


Which syntax is correct to declare array string in JavaScript
a) String cars = *“KIA", "Volvo", "BMW"];
b) var cars = new *“KIA", "Volvo", "BMW"];
c) var cars = *“KIA", "Volvo", "BMW"];
d) var cars = new String *“KIA", "Volvo", "BMW"];

What is the output?


var i = 10;

if (i > 15)
document.write("Good");

else
document.write("Bad");

a) Good
b) Bad
c) Error
d) Exception

What is the output?


<!DOCTYPE html>
<html>
<body>

Prepared By: Eng. Abanoub Ibrahim


<p id="demo"></p>
<script>
var sum=0;
for (var i=1; i <= 5; i++) {
sum += i;
}
document.getElementById("demo").innerHTML = sum;
</script>
</body>
</html>
a) 1
b) 5
c) 15
d) Error

………………..is used to store multiple values in a single variable.


a) Var
b) Array
c) Table
d) Database

In JavaScript to declare a variable as a constant …….


a) Var const
b) Var

Prepared By: Eng. Abanoub Ibrahim


c) Const
d) Final

……………………….You can reuse code: Define the code once, and


use it many times.
a) Loop
b) Array
c) Function

In JavaScript you can access object properties using ……………


a) objectName.propertyName
b) objectName["propertyName"]
c) All of the above
d) None of the above

<script>
const person = {
firstName: "John",
lastName : "Doe",
id : 5566};
document.getElementById("demo").innerHTML =
person.firstName + " " + person.lastName;
</script>

Prepared By: Eng. Abanoub Ibrahim


a) John Doe
b) Doe John
c) firstName lastName
d) person.firstName + " " + person.lastName

Prepared By: Eng. Abanoub Ibrahim

You might also like