WorksheetsSEM 1 2021 QUIZ 1 (5%) - Chapter 1 - 7
Total questions: 20
Worksheet time: 9mins
In jQuery, which of the following is selected by $('.foo')?
<p>Foo</p>
<img id='foo'></img>
<div class='foo'></div>
<foo></foo>
In jQuery, which of the following is selected by $('.foo')?
<p>Foo</p>
<img id='foo'></img>
<div class='foo'></div>
<foo></foo>
In jQuery, the "#" is used to select an html element by its:
class
id
name
data attribute
How do I declare a new variable in javaScript?
var newVariable = 5
Variable int = new Variable()
var 5 = myVariable
int var = 5
Choose the right Javascript event
inmouseout
anmouseout
enmouseout
onmouseout
What is the extension for a JavaScript file?
.java
.jar
.js
.sj
Choose the best syntax to write conditional statement for
"His name is Fred and he is less than 16 years old".
if (name = "fred" && age < 16 )
if (name === "fred" && age < 16 )
if (name = "fred" || age < 16 )
if (name === "fred" || age < 16 )
Which of these is a loop?
if(x<10)
while(x<10)
var x=10;
text(x,10;10)
Which of these is part of the Box model of CSS?
div
p
tag
padding
What does this mean:
A:hover { color: blue; }
Links are blue when you hover over them
Animations are blue when you hover over them
The background colour of the body is blue when hovered
There is no blue allowed on the page
Which CSS code will change the background colour of a web page?
backroundColor: blue;
background-color: blue;
background color: blue;
color: blue;
What type of software/app do you need on a computer to view web pages?
Camera
Web Browser
Web Server
Text Editor
A collection of web pages is called a_____
web server
web browser
website
WiFi
Which code below is correct for a hyperlink?
<a>
"https://google.com"
Click Me
</a>
<a>Click Me>
"https://google.com"
</a>
<a herf="https://google.com">
Click Me
</a>
<a href="https://www.google.com">
Click Me
</a>
An attribute is a _____________
Applies changes to everything
Different options for each tag
Allows for no changes to the site
Gives structure and text
<style> tags are used to______
Apply style to one line
Not used in HTML
Used at the top of the page to apply a style to the entire document
Used sparingly
Write css syntax to display hyperlinks without an underline.
a { (a) }
Write css syntax to display paragraph in italic.
p { (a) }
Complete below code to hide an element with id="test".
$("_? (a) ").hide();
A (a) is used to tells the browser how to display our content.
