Rejin Rajan
Quiz by , created more than 1 year ago

Internet Technology Lab Viva 1

102
4
0
No tags specified
Rejin Rajan
Created by Rejin Rajan about 6 years ago
Close

Internet Technology Lab Viva 1

Question 1 of 50

1

Inside which HTML element do we put the JavaScript?

Select one of the following:

  • <javascript>

  • <scripting>

  • <script>

  • <js>

Explanation

Question 2 of 50

1

What is the correct JavaScript syntax to change the content of the HTML element below?

<p id="demo">This is a demonstration.</p>

Select one of the following:

  • #demo.innerHTML = "Hello World!";

  • document.getElement("p").innerHTML = "Hello World!";

  • document.getElementByName("p").innerHTML = "Hello World!";

  • document.getElementById("demo").innerHTML = "Hello World!";

Explanation

Question 3 of 50

1

How do you write "Hello World" in an alert box?

Select one of the following:

  • msgBox("Hello World");

  • alertBox("Hello World");

  • alert("Hello World");

  • msg("Hello World");

Explanation

Question 4 of 50

1

How do you call a function named "myFunction"?

Select one of the following:

  • myFunction()

  • call myFunction()

  • call function myFunction()

Explanation

Question 5 of 50

1

How to write an IF statement for executing some code if "i" is NOT equal to 5?

Select one of the following:

  • if (i != 5)

  • if (i <> 5)

  • if i =! 5 then

  • if i <> 5

Explanation

Question 6 of 50

1

How does a FOR loop start?

Select one of the following:

  • for (i <= 5; i++)

  • for (i = 0; i <= 5)

  • for i = 1 to 5

  • for (i = 0; i <= 5; i++)

Explanation

Question 7 of 50

1

How can you add a comment in a JavaScript?

Select one of the following:

  • //This is a comment

  • 'This is a comment

  • <!--This is a comment-->

Explanation

Question 8 of 50

1

How do you round the number 7.25, to the nearest integer?

Select one of the following:

  • round(7.25)

  • Math.rnd(7.25)

  • rnd(7.25)

  • Math.round(7.25)

Explanation

Question 9 of 50

1

JavaScript is the same as Java.

Select one of the following:

  • True
  • False

Explanation

Question 10 of 50

1

Which event occurs when the user clicks on an HTML element?

Select one of the following:

  • onclick

  • onchange

  • onmouseover

  • onmouseclick

Explanation

Question 11 of 50

1

Who is making the Web standards?

Select one of the following:

  • Microsoft

  • The World Wide Web Consortium

  • Mozilla

  • Google

Explanation

Question 12 of 50

1

Choose the correct HTML element for the largest heading:

Select one of the following:

  • <h6>

  • <head>

  • <h1>

  • <heading>

Explanation

Question 13 of 50

1

Choose the correct HTML element to define emphasized text

Select one of the following:

  • <i>

  • <em>

  • <italic>

Explanation

Question 14 of 50

1

What is the correct HTML for creating a hyperlink?

Select one of the following:

  • <a url="http://www.w3schools.com">W3Schools.com</a>

  • <a href="http://www.w3schools.com">W3Schools</a>

  • <a>http://www.w3schools.com</a>

  • <a name="http://www.w3schools.com">W3Schools.com</a>

Explanation

Question 15 of 50

1

How can you make a numbered list?

Select one of the following:

  • <ol>

  • <ul>

  • <list>

  • <dl>

Explanation

Question 16 of 50

1

What is the correct HTML for making a checkbox?

Select one of the following:

  • <input type="check">

  • <input type="checkbox">

  • <check>

  • <checkbox>

Explanation

Question 17 of 50

1

What is the correct HTML for making a drop-down list?

Select one of the following:

  • <list>

  • <input type="list">

  • <select>

  • <input type="dropdown">

Explanation

Question 18 of 50

1

What is the correct HTML for inserting an image?

Select one of the following:

  • <img href="image.gif" alt="MyImage">

  • <img alt="MyImage">image.gif</img>

  • <img src="image.gif" alt="MyImage">

  • <image src="image.gif" alt="MyImage">

Explanation

Question 19 of 50

1

HTML comments start with <!-- and end with -->

Select one of the following:

  • True
  • False

Explanation

Question 20 of 50

1

Which HTML element defines the title of a document?

Select one of the following:

  • <meta>

  • <head>

  • <title>

Explanation

Question 21 of 50

1

Which HTML element is used to specify a footer for a document or section?

Select one of the following:

  • <section>

  • <footer>

  • <bottom>

Explanation

Question 22 of 50

1

In HTML, onblur and onfocus are:

Select one of the following:

  • HTML elements

  • Event attributes

  • Style attributes

Explanation

Question 23 of 50

1

Which HTML element defines navigation links?

Select one of the following:

  • <navigate>

  • <nav>

  • <navigation>

Explanation

Question 24 of 50

1

What does CSS stand for?

Select one of the following:

  • Colorful Style Sheets

  • Cascading Style Sheets

  • Computer Style Sheets

  • Creative Style Sheets

Explanation

Question 25 of 50

1

What is the correct HTML for referring to an external style sheet?

Select one of the following:

  • <link rel="stylesheet" type="text/css" href="mystyle.css">

  • <style src="mystyle.css">

  • <stylesheet>mystyle.css</stylesheet>

Explanation

Question 26 of 50

1

Which HTML attribute is used to define inline styles?

Select one of the following:

  • style

  • class

  • styles

  • font

Explanation

Question 27 of 50

1

How do you insert a comment in a CSS file?

Select one of the following:

  • /* this is a comment */

  • // this is a comment

  • ' this is a comment

  • // this is a comment //

Explanation

Question 28 of 50

1

Which CSS property is used to change the text color of an element?

Select one of the following:

  • color

  • fgcolor

  • text-color

Explanation

Question 29 of 50

1

What is the correct CSS syntax for making all the <p> elements bold?

Select one of the following:

  • p {text-size:bold;}

  • <p style="text-size:bold;">

  • <p style="font-size:bold;">

  • p {font-weight:bold;}

Explanation

Question 30 of 50

1

How do you display hyperlinks without an underline?

Select one of the following:

  • a {text-decoration:no-underline;}

  • a {text-decoration:none;}

  • a {decoration:no-underline;}

  • a {underline:none;}

Explanation

Question 31 of 50

1

How do you display a border like this:
The top border = 10 pixels
The bottom border = 5 pixels
The left border = 20 pixels
The right border = 1pixel?

Select one of the following:

  • border-width:10px 1px 5px 20px;

  • border-width:10px 5px 20px 1px;

  • border-width:10px 20px 5px 1px;

  • border-width:5px 20px 10px 1px;

Explanation

Question 32 of 50

1

When using the padding property; are you allowed to use negative values?

Select one of the following:

  • True
  • False

Explanation

Question 33 of 50

1

How do you select an element with id "demo"?

Select one of the following:

  • #demo

  • .demo

  • demo

  • *demo

Explanation

Question 34 of 50

1

How do you select all p elements inside a div element?

Select one of the following:

  • div.p

  • div + p

  • div p

Explanation

Question 35 of 50

1

What is the default value of the position property?

Select one of the following:

  • fixed

  • static

  • relative

  • absolute

Explanation

Question 36 of 50

1

Where is the correct place to insert a JavaScript?

Select one of the following:

  • The <head> section

  • The <body> section

  • Both the <head> section and the <body> section are correct

Explanation

Question 37 of 50

1

How can you make an e-mail link?

Select one of the following:

  • <mail href +"xxx@y.com">

  • <a href ="mailto: xxx@y.com">

  • <a = "xxx@y.com">

  • Both (b) and (c)

Explanation

Question 38 of 50

1

Main container for <TR>, <TD> and <TH> is

Select one of the following:

  • <TABLE>

  • <GROUP>

  • <DATA>

  • All of these

Explanation

Question 39 of 50

1

The latest HTML standard is

Select one of the following:

  • XML

  • SGML

  • HTML 4.0

  • HTML 5.0

Explanation

Question 40 of 50

1

The attribute of <form> tag

Select one of the following:

  • Method

  • Action

  • Both (a)&(b)

  • None of these

Explanation

Question 41 of 50

1

HTML is platform independent.

Select one of the following:

  • True
  • False

Explanation

Question 42 of 50

1

HTML is considered as _________ language.

Select one of the following:

  • Higher Level Language

  • Markup Language

  • OOP Language

  • Programming Language

Explanation

Question 43 of 50

1

How do you declare a JavaScript variable?

Select one of the following:

  • var carName;

  • v carName;

  • variable carName;

Explanation

Question 44 of 50

1

How do you find the number with the highest value of x and y?

Select one of the following:

  • top(x, y)

  • Math.max(x, y)

  • ceil(x, y)

  • Math.ceil(x, y)

Explanation

Question 45 of 50

1

Which is the correct CSS syntax?

Select one of the following:

  • {body:color=black;}

  • {body;color:black;}

  • body {color: black;}

  • body:color=black;

Explanation

Question 46 of 50

1

How do you add a background color for all <h1> elements?

Select one of the following:

  • all.h1 {background-color:#FFFFFF;}

  • h1.all {background-color:#FFFFFF;}

  • h1 {background-color:#FFFFFF;}

  • All of the above

Explanation

Question 47 of 50

1

Which property is used to change the font of an element?

Select one of the following:

  • font-family

  • font

  • Both font-family and font can be used

Explanation

Question 48 of 50

1

How to insert a comment that has more than one line in CSS?

Select one of the following:

  • /*This comment has
    more than one line*/

  • //This comment has
    more than one line//

  • <!--This comment has
    more than one line-->

Explanation

Question 49 of 50

1

What is the correct way to write a JavaScript array?

Select one of the following:

  • var colors = "red", "green", "blue"

  • var colors = (1:"red", 2:"green", 3:"blue")

  • var colors = 1 = ("red"), 2 = ("green"), 3 = ("blue")

  • var colors = ["red", "green", "blue"]

Explanation

Question 50 of 50

1

What is the correct HTML for inserting a background image?

Select one of the following:

  • <body style="background-image:url(background.gif)">

  • <background img="background.gif">

  • <body bg="background.gif">

Explanation