Font size
WorksheetsSP- Level 2
Total questions: 50
Worksheet time: 25mins
How is document type initialized in HTML5.?
</DOCTYPE HTML>
</DOCTYPE>
</DOCTYPE html>
<!DOCTYPE HTML>
Which of the following is the correct syntax for referring the external style sheet?
<style src = example.css>
<style src = "example.css" >
<stylesheet> example.css </stylesheet>
<link rel="stylesheet" type="text/css" href="example.css">
Inside which HTML element do we put the JavaScript?
<script>
<javascript>
<js>
<scripting>
What is the correct JavaScript syntax to change the content of the HTML element below?<p id="demo">This is a demonstration.</p>
document.getelemnt.id(demo).innerHTML='hello'
document.getElemntById('demo').innerHTML='hello'
document.getElemntById('#p').innerHTML='hello'
document.getElemntById('demo').innerhtml='hello'
Where is the correct place to insert a JavaScript?
Head
body
both
What is the correct syntax for referring to an external script called "xxx.js"?
<link rel='javascript' href='xxx.js'>
<script src='xxx.js'></script>
<script href='xxx.js'></script>
Which of these elements are all <table> elements?
<table><tr><td>
<table><td><tr>
<table><tr></tr><td>
<table></table>
Which of the following is a font property?
Color
size
family
all the above
Multimedia can be embedded in an HTML document.
True
False
Maybe
Change the border size of the body or image
border-style
border-color
border-width
width
What does a class do?
adds color to words
adds style to specific elements
adds a lot more work
adds style to a whole page
Select the rule set to make all the text in your web page blue and centered.
p {
color: blue;
}
body {
text-position: left;
color: blue;
}
p {
text-align: center,
color: blue;
}
body {
text-align: center;
color: blue;
}
What will this rule set create?
h1 {
text-decoration: underline overline dotted red;
}
red waves under the heading
red dots over and under the heading
red waves over and under the heading
red dots over the heading
What will this rule set create?
<script>
functionname loop()
{
for(I=0;i<=3;i++)
print('SP Competition
}
<button onclick='loop()'>loop</button>
wrong syntax
SP competition
SP competition
SP competition
SP competition
print('sp competition')
SP competition
SP competition
SP competition
Which of the following is true about variable naming conventions in JavaScript?
JavaScript variable names must begin with a letter or the underscore character.
JavaScript variable names are case sensitive.
Both of the above.
None of the above.
Which of the following is the correct syntax to alert a page using JavaScript?
window.alert();
browser.alert();
navigator.alert();
document.alert();
JavaScript is a ___ -side programming language.
Client
Server
both
none of them
Which of the following statements will throw an error?Please select 2 correct answers
var fun = 'hello'
var fun = function bar{ }
function fun( ){ }
Function fun( ){ }
Which are the correct “if” statements to execute certain code if “x” is equal to 2?
if(x 2)
if(x = 2)
if(x == 2)
if(x != 2 )
Which of the following print a content on the browser window?
document.write(“print content”);
response.write(“print content”);
document.write(print content);
write(“print content”);
Which of the following statements will show a message as well as ask for user input in a popup?
alert()
prompt()
confirm()
message()
Opening Tag of HTML Tag is called as ________.
Closed Tag
Forward Tag
Starting Tag
Enging Tag
HTML Code written in MAC can be browsed in a PC with Window 7 installed , User will be able to see same design that was designed on the MAC Pc.
True
False
May be
Which of the following attributes comes in handy when borders have to be put between groups of columns instead of every column?
rowspan
colspan
border-collapse
Row
Which of the following is valid colour code ?
#000000;
#0000000;
#00000000;
#000000000;
The href attribute in the link tag specifies the:
Destination of a link.
Link
Hypertext
None of the above
What are <div> tags used for?
To replace paragraphs. i.e. p tags
To logically divide the paragraphs
To logically divide the document
To provide space between tables
How can we resize the image?
Using resize attribute
Using height and width
Using size attribute
Using rs attribute
When creating a Web document, what format is used to express an image's height and width?
Pixels
Centimeters
Dots per inch
Inches
What does an HTML tag do?
It determines the organizational structure of your Web site.
It connects your web site to an operating environment.
it hides programming instructions from view.
it specifies formatting and layout instructions for your web page.
If background image is smaller than the screen, what will happen?
it'll be stretched
it'll be repeated
it'll leave blank space at the
None of these
select the correct element for defining a navigation menu for your site.
a
h
div
ul
How can you created rounded corners using CSS3?
border[round]: 30px;
corner-effect: round;
border-radius: 30px;
alpha-effect: round-corner;
How to resize a background image using CSS3?
background-size: 80px 60px
bg-dimensions: 80px 60px;
background-proportion: 80px 60px;
alpha-effect: bg-resize 80px 60px;
Has CSS3 been fully supported by all browsers?
Yes
No
How do four values work on border-radius
top, bottom, left, right
up, down, front, behind
top-left, top-right, bottom-right, bottom-left
bottom-left, bottom-right, top-right, top-left
What is css Float?
allows other elements to wrap around an element
element can be pushed to the left or right
both a and b above
element can be pushed to any direction
In CSS, it is not possible to specify different padding for different sides
True
False
Maybe
____________ property specifies an image to use as the background of an element
backg-img
backg-image
background-img
background-image
The _____________ selector is used to specify a style for a single, unique element
id
class
tag name
selector
Which of the below is the correct way to set a font size?
h2 {font-size:200%;}
h2 {font-size:200px;}
both a and b above
h2 {font-size:200;}
If you put a value of 0 for a Border-Radius what will happen?
The Corner will curve horizontal.
The Corner will be square
The Corner will curve vertical.
The world will end.
JavaScript ignores extra spaces
true
false
raise error
html ignores extra spaces
true
false
raise error
css ignores extra spaces
true
false
raise error
Which of the following is correct to write “Hello World†on the web page?
System.out.println('Hello World')
print('Hello World')
document.write('Hello World')
response.write('Hello World')
changing background color using javascript for whole the page
document.getElementById('bd').style.backgroundcolor='deepskyblue';
document.getElementById('bd').style.backgroundColor='deepskyblue';
document.getElementById(body).style.backgroundcolor='deepskyblue';
document.getElementById('bd').style.backgroundcolor('deepskyblue')
which loop will run at least one time even if the condition will not recognized
while loop
do while loop
for loop
none of them
the correct syntax for the do while loop
do()
{
loop body
}
while(condition)
do
{
loop body
}
while(condition)
do
{
loop body;
I++;
}
while(condition)
Do
{
loop body
}
while(condition)
Which of these expressions is NOT a valid way to add 1 to a variable in JavaScript?
x++
x += 1
x = x + 1
x+
