Cau Hoi
Cau Hoi
Question 2:
Who is making the Web standards?
The World Wide Web Consortium
Microsoft
Mozilla
Google
Question 3:
Choose the correct HTML element for the largest heading:
<h1>
<heading>
<head>
<h6>
Question 4:
What is the correct HTML element for inserting a line break?
<br>
<lb>
<break>
Question 5:
What is the correct HTML for adding a background color?
<body style="background-color:yellow;">
<body bg="yellow">
<background>yellow</background>
Question 6:
Choose the correct HTML element to define important text
<b>
<i>
<strong>
<important>
Question 7:
Choose the correct HTML element to define emphasized text
<em>
<italic>
<i>
Question 8:
What is the correct HTML for creating a hyperlink?
<a href="http://www.w3schools.com">W3Schools</a>
<a name="http://www.w3schools.com">W3Schools.com</a>
<a url="http://www.w3schools.com">W3Schools.com</a>
<a>http://www.w3schools.com</a>
Question 9:
Which character is used to indicate an end tag?
<
/
*
^
Question 10:
How can you open a link in a new tab/browser window?
Question 11:
Which of these elements are all <table> elements?
<thead><body><tr>
<table><tr><tt>
<table><tr><td>
<table><head><tfoot>
Question 12:
Inline elements are normally displayed without starting a new line.
False
True
Question 13:
How can you make a numbered list?
<list>
<dl>
<ul>
<ol>
Question 14:
How can you make a bulleted list?
<list>
<ul>
<dl>
<ol>
Question 15:
What is the correct HTML for making a checkbox?
<check>
<input type="check">
<checkbox>
<input type="checkbox">
Question 16:
What is the correct HTML for making a text input field?
<input type="textfield">
<input type="text">
<textinput type="text">
<textfield>
Question 17:
What is the correct HTML for making a drop-down list?
<input type="dropdown">
<list>
<select>
<input type="list">
Question 18:
What is the correct HTML for making a text area?
<input type="textbox">
<input type="textarea">
<textarea>
Question 19:
What is the correct HTML for inserting an image?
Question 20:
What is the correct HTML for inserting a background image?
<background img="background.gif">
<body style="background-image:url(background.gif)">
<body bg="background.gif">
Question 21:
An <iframe> is used to display a web page within a web page.
True
There is no such thing as an <iframe>
False
Question 22:
HTML comments start with <!-- and end with -->
True
False
Question 23:
Block elements are normally displayed without starting a new line.
False
True
Question 24:
Which HTML element defines the title of a document?
<meta>
<title>
<head>
Question 25:
Which HTML attribute specifies an alternate text for an image, if the image cannot
be displayed?
src
title
longdesc
alt
Question 26:
Which doctype is correct for HTML5?
<!DOCTYPE HTML5>
<!DOCTYPE html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 5.0//EN"
"http://www.w3.org/TR/html5/strict.dtd">
Question 27:
Which HTML element is used to specify a footer for a document or section?
<bottom>
<footer>
<section>
Question 28:
In HTML, you can embed SVG elements directly into an HTML page.
True
False
Question 29:
What is the correct HTML element for playing video files?
<media>
<video>
<movie>
Question 30:
What is the correct HTML element for playing audio files?
<sound>
<audio>
<mp3>
Question 31:
The HTML global attribute, "contenteditable" is used to:
Specifies a context menu for an element. The menu appears when a user right-clicks
on the element
Return the position of the first found occurrence of content inside a string
Update content from the server
Specify whether the content of an element should be editable or not
Question 32:
In HTML, onblur and onfocus are:
Event attributes
Style attributes
HTML elements
Question 33:
Graphics defined by SVG is in which format?
HTML
CSS
XML
Question 34:
The HTML <canvas> element is used to:
draw graphics
display database records
create draggable elements
manipulate data in MySQL
Question 35:
In HTML, which attribute is used to specify that an input field must be filled out?
required
placeholder
validate
formvalidate
Question 36:
Which input type defines a slider control?
controls
range
slider
search
Question 37:
Which HTML element is used to display a scalar measurement within a range?
<gauge>
<measure>
<meter>
<range>
Question 38:
Which HTML element defines navigation links?
<nav>
<navigation>
<navigate>
Question 39:
In HTML, what does the <aside> element define?
<section>
<top>
<header>
<head>
Question 1:
What does CSS stand for?
<stylesheet>mystyle.css</stylesheet>
<style src="mystyle.css">
<link rel="stylesheet" type="text/css" href="mystyle.css">
Question 3:
Where in an HTML document is the correct place to refer to an external style sheet?
<style>
<css>
<script>
Question 5:
Which HTML attribute is used to define inline styles?
class
font
styles
style
Question 6:
Which is the correct CSS syntax?
// this is a comment //
// this is a comment
/* this is a comment */
' this is a comment
Question 8:
Which property is used to change the background color?
background-color
bgcolor
color
Question 9:
How do you add a background color for all <h1> elements?
all.h1 {background-color:#FFFFFF;}
h1 {background-color:#FFFFFF;}
h1.all {background-color:#FFFFFF;}
Question 10:
Which CSS property is used to change the text color of an element?
color
fgcolor
text-color
Question 11:
Which CSS property controls the text size?
font-size
text-style
font-style
text-size
Question 12:
What is the correct CSS syntax for making all the <p> elements bold?
p {font-weight:bold;}
p {text-size:bold;}
<p style="text-size:bold;">
<p style="font-size:bold;">
Question 13:
How do you display hyperlinks without an underline?
a {decoration:no-underline;}
a {text-decoration:none;}
a {text-decoration:no-underline;}
a {underline:none;}
Question 14:
How do you make each word in a text start with a capital letter?
transform:capitalize
text-transform:capitalize
You can't do that with CSS
text-style:capitalize
Question 15:
Which property is used to change the font of an element?
font-style
font-weight
font-family
Question 16:
How do you make the text bold?
style:bold;
font-weight:bold;
font:bold;
Question 17:
How do you display a border like this:
padding-left
indent
margin-left
Question 19:
When using the padding property; are you allowed to use negative values?
No
Yes
Question 20:
How do you make a list that lists its items with squares?
list-type: square;
list-style-type: square;
list: square;
Question 21:
How do you select an element with id 'demo'?
.demo
demo
#demo
*demo
Question 22:
How do you select elements with class name 'test'?
test
.test
#test
*test
Question 23:
How do you select all p elements inside a div element?
div + p
div.p
div p
Question 24:
How do you group selectors?
static
relative
absolute
fixed
Question 1:
Inside which HTML element do we put the JavaScript?
<javascript>
<js>
<scripting>
<script>
Question 2:
What is the correct JavaScript syntax to change the content of the HTML element
below?
<script name="xxx.js">
<script href="xxx.js">
<script src="xxx.js">
Question 5:
The external JavaScript file must contain the <script> tag.
False
True
Question 6:
How do you write "Hello World" in an alert box?
alertBox("Hello World");
msgBox("Hello World");
msg("Hello World");
alert("Hello World");
Question 7:
How do you create a function in JavaScript?
function myFunction()
function:myFunction()
function = myFunction()
Question 8:
How do you call a function named "myFunction"?
if (i == 5)
if i = 5
if i = 5 then
if i == 5 then
Question 10:
How to write an IF statement for executing some code if "i" is NOT equal to 5?
if (i <> 5)
if i <> 5
if i =! 5 then
if (i != 5)
Question 11:
How does a WHILE loop start?
for i = 1 to 5
for (i = 0; i <= 5; i++)
for (i = 0; i <= 5)
for (i <= 5; i++)
Question 13:
How can you add a comment in a JavaScript?
'This is a comment
<!--This is a comment-->
//This is a comment
Question 14:
How to insert a comment that has more than one line?
Math.round(7.25)
rnd(7.25)
round(7.25)
Math.rnd(7.25)
Question 17:
How do you find the number with the highest value of x and y?
Math.max(x, y)
Math.ceil(x, y)
top(x, y)
ceil(x, y)
Question 18:
What is the correct JavaScript syntax for opening a new window called "w2" ?
w2 = window.new("http://www.w3schools.com");
w2 = window.open("http://www.w3schools.com");
Question 19:
JavaScript is the same as Java.
False
True
Question 20:
How can you detect the client's browser name?
client.navName
browser.name
navigator.appName
Question 21:
Which event occurs when the user clicks on an HTML element?
onchange
onclick
onmouseclick
onmouseover
Question 22:
How do you declare a JavaScript variable?
var carName;
variable carName;
v carName;
Question 23:
Which operator is used to assign a value to a variable?
-
*
=
x
Question 24:
What will the following code return: Boolean(10 > 9)
NaN
false
true
Question 25:
Is JavaScript case-sensitive?
No
Yes
Question 1:
What does PHP stand for?
<?php>...</?>
<?php...?>
<script>...</script>
<&>...</&>
Question 3:
How do you write "Hello World" in PHP
Document.Write("Hello World");
"Hello World";
echo "Hello World";
Question 4:
All variables in PHP start with which symbol?
$
&
!
Question 5:
What is the correct way to end a PHP statement?
.
</php>
New line
;
Question 6:
The PHP syntax is most similar to:
JavaScript
VBScript
Perl and C
Question 7:
How do you get information from a form that is submitted using the "get" method?
$_GET[];
Request.Form;
Request.QueryString;
Question 8:
When using the POST method, variables are displayed in the URL:
False
True
Question 9:
In PHP you can use both single quotes ( ' ' ) and double quotes ( " " ) for
strings:
False
True
Question 10:
Include files must have the file extension ".inc"
False
True
Question 11:
What is the correct way to include the file "time.inc" ?
new_function myFunction()
function myFunction()
create myFunction()
Question 13:
What is the correct way to open the file "time.txt" as readable?
open("time.txt","read");
fopen("time.txt","r+");
open("time.txt");
fopen("time.txt","r");
Question 14:
PHP allows you to send emails directly from a script
False
True
Question 15:
Which superglobal variable holds information about headers, paths, and script
locations?
$_SERVER
$_SESSION
$GLOBALS
$_GET
Question 16:
What is the correct way to add 1 to the $count variable?
++count
$count++;
count++;
$count =+1
Question 17:
What is a correct way to add a comment in PHP?
*\...\*
/*...*/
<!--...-->
<comment>...</comment>
Question 18:
PHP can be run on Microsoft Windows IIS(Internet Information Server):
True
False
Question 19:
The die() and exit() functions do the exact same thing.
False
True
Question 20:
Which one of these variables has an illegal name?
$my_Var
$myVar
$my-Var
Question 21:
How do you create a cookie in PHP?
setcookie()
createcookie
makecookie()
Question 22:
In PHP, the only way to output text is with echo.
True
False
Question 23:
How do you create an array in PHP?
False
True
Question 25:
Which operator is used to check if two values are equal and of same data type?
==
=
===
!=