Multipe Choice
HTML
1. What does HTML stand for?
Hyperlinks and Text Markup Language
Hyper Text Markup Language
Home Tool Markup Language
2. Who is making the Web standards?
Netscape
Microsoft
The World Wide Web Consortium
3. Choose the correct HTML tag for the largest heading
<heading>
<head>
<h1>
<h6>
4. What is the correct HTML tag for inserting a line break?
<break>
<br>
<lb>
5. What is the correct HTML for adding a background color?
<background>yellow</background>
<body color="yellow">
<body bgcolor="yellow">
6. Choose the correct HTML tag to make a text bold
<bold>
<b>
<bld>
<bb>
7. Choose the correct HTML tag to make a text italic
<ii>
<i>
<italics>
8. What is the correct HTML for making a hyperlink?
<a>http://www.w3schools.com</a>
<a name="http://www.w3schools.com">W3Schools.com</a>
<a url="http://www.w3schools.com">W3Schools.com</a>
<a href="http://www.w3schools.com">W3Schools</a>
9. How can you make an e-mail link?
<mail>xxx@yyy</mail>
<a href="xxx@yyy">
<a href="mailto:xxx@yyy">
<mail href="xxx@yyy">
10. How can you open a link in a new browser window?
<a href="url" new>
<a href="url" target="_blank">
<a href="url" target="new">
11. Which of these tags are all <table> tags?
<table><tr><td>
<table><head><tfoot>
<thead><body><tr>
<table><tr><tt>
12. Choose the correct HTML to left-align the content inside a tablecell
<td align="left">
<td leftalign>
<td valign="left">
<tdleft>
13. How can you make a list that lists the items with numbers?
<list>
<dl>
<ol>
<ul>
14. How can you make a list that lists the items with bullets?
<dl>
<list>
<ul>
<ol>
15. What is the correct HTML for making a checkbox?
<input type="check">
<checkbox>
<input type="checkbox">
<check>
16. What is the correct HTML for making a text input field?
<input type="text">
<textinput type="text">
<input type="textfield">
<textfield>
17. What is the correct HTML for making a drop-down list?
<select>
<input type="dropdown">
<input type="list">
<list>
18. What is the correct HTML for making a text area?
<input type="textbox">
<input type="textarea">
<textarea>
19. What is the correct HTML for inserting an image?
<image src="image.gif">
<img href="image.gif>
<img src="image.gif">
<img>image.gif</img>
20. What is the correct HTML for inserting a background image?
<body background="background.gif">
<background img="background.gif">
<img src="background.gif" background>
CSS
1. What does CSS stand for?
Colorful Style Sheets
Computer Style Sheets
Cascading Style Sheets
Creative Style Sheets
2. What is the correct HTML for referring to an external style sheet?
<style src="mystyle.css">
<link rel="stylesheet" type="text/css" href="mystyle.css">
<stylesheet>mystyle.css</stylesheet>
3. Where in an HTML document is the correct place to refer to an external style sheet?
In the <head> section
At the end of the document
In the <body> section
At the top of the document
4. Which HTML tag is used to define an internal style sheet?
<script>
<style>
<css>
5. Which HTML attribute is used to define inline styles?
style
font
styles
class
6. Which is the correct CSS syntax?
body:color=black
body {color: black}
{body;color:black}
{body:color=black(body}
7. How do you insert a comment in a CSS file?
// this is a comment
/* this is a comment */
// this is a comment //
' this is a comment
8. Which property is used to change the background color?
background-color:
color:
bgcolor:
9. How do you add a background color for all <h1> elements?
h1.all {background-color:#FFFFFF}
h1 {background-color:#FFFFFF}
all.h1 {background-color:#FFFFFF}
10. How do you change the text color of an element?
text-color:
fgcolor:
color:
text-color=
11. Which CSS property controls the text size?
font-size
font-style
text-size
text-style
12. What is the correct CSS syntax for making all the <p> elements bold?
p {text-size:bold}
<p style="text-size:bold">
<p style="font-size:bold">
p {font-weight:bold}
13. How do you display hyperlinks without an underline?
a {decoration:no underline}
a {text-decoration:none}
a {underline:none}
a {text-decoration:no underline}
14. How do you make each word in a text start with a capital letter?
You can't do that with CSS
text-transform:uppercase
text-transform:capitalize
15. How do you change the font of an element?
font-family:
font=
f:
16. How do you make the text bold?
font-weight:bold
style:bold
font:b
17. 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?
border-width:10px 5px 20px 1px
border-width:10px 1px 5px 20px
border-width:5px 20px 10px 1px
border-width:10px 20px 5px 1px
18. How do you change the left margin of an element?
indent:
margin:
margin-left:
text-indent:
19. To define the space between the element's border and content, you use the padding property, but are you allowed to use negative values?
No
Yes
20. How do you make a list that lists its items with squares?
type: 2
list-style-type: square
type: square
list-type: square
JAVASCRIPT
1. Inside which HTML element do we put the JavaScript?
<script>
<js>
<scripting>
<javascript>
2. What is the correct JavaScript syntax to write "Hello World"?
response.write("Hello World")
document.write("Hello World")
("Hello World")
"Hello World"
3. Where is the correct place to insert a JavaScript?
The <body> section
The <head> section
Both the <head> section and the <body> section are correct
4. What is the correct syntax for referring to an external script called "xxx.js"?
<script href="xxx.js">
<script src="xxx.js">
<script name="xxx.js">
5. An external JavaScript must contain the <script> tag
True
False
6. How do you write "Hello World" in an alert box?
alertBox("Hello World")
msgBox("Hello World")
alertBox="Hello World"
alert("Hello World")
7. How do you create a function?
function myFunction()
function:myFunction()
function=myFunction()
8. How do you call a function named "myFunction"?
myFunction()
call myFunction()
call function myFunction
9. How do you write a conditional statement for executing some statements only if "i" is equal to 5?
if i==5 then
if i=5
if i=5 then
if (i==5)
10. How do you write a conditional statement for executing some statements only if "i" is NOT equal to 5?
if <>5
if (i <> 5)
if (i != 5)
if =! 5 then
11. How many different kind of loops are there in JavaScript?
Two. The "for" loop and the "while" loop
Four. The "for" loop, the "while" loop, the "do...while" loop, and the "loop...until" loop
One. The "for" loop
12. How does a "for" loop start?
for i = 1 to 5
for (i = 0; i <= 5)
for (i <= 5; i++)
for (i = 0; i <= 5; i++)
13. How can you add a comment in a JavaScript?
<!--This is a comment-->
'This is a comment
//This is a comment
14. What is the correct JavaScript syntax to insert a comment that has more than one line?
//This comment has
more than one line//
<!--This comment has
more than one line-->
/*This comment has
more than one line*/
15. What is the correct way to write a JavaScript array?
var txt = new Array:1=("tim")2=("kim")3=("jim")
var txt = new Array(1:"tim",2:"kim",3:"jim")
var txt = new Array("tim","kim","jim")
var txt = new Array="tim","kim","jim"
16. How do you round the number 7.25, to the nearest whole number?
rnd(7.25)
Math.rnd(7.25)
round(7.25)
Math.round(7.25)
17. How do you find the largest number of 2 and 4?
top(2,4)
ceil(2,4)
Math.ceil(2,4)
Math.max(2,4)
18. What is the correct JavaScript syntax for opening a new window called "window2" ?
window.open("http://www.w3schools.com","window2")
new("http://www.w3schools.com","window2")
open.new("http://www.w3schools.com","window2")
new.window("http://www.w3schools.com","window2")
19. How do you put a message in the browser's status bar?
statusbar = "put your message here"
status("put your message here")
window.status = "put your message here"
window.status("put your message here")
20. How do you find the client's browser name?
navigator.appName
browser.name
client.navName
ESSAY QUESTIONS
One paragraph on each of:
Polymorphism
classes
Inheritance
Encapsulation
Object Oriented Programming
Compiler vs Interpreter
PRAC WORK
A simple static site
A group project
A dynamic site - PHP Reading a MySQL Database