NEW
Font size
WorksheetsQuiz-4 Sec-B 28-9-2022
Total questions: 80
Worksheet time: 40mins
Assume you have two files for your website, and these files exist in the same folder:
about.html
style.css
Which of the following is the proper way to apply the CSS code inside style.css to the about.html file?
Inside style.css:
applyTo { href: about.html; }
Inside about.html:
<head>
<style href="style.css"></style>
</head>
Inside style.css:
<html href="about.html">
Inside about.html:
<head>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
Which of the following would you use an IFrame for?
Embedding a map from Google Maps in your website
Adding an image to your website
Changing an image’s opacity when the user hovers over the image
Adding a filter to an image on your website
You are trying to apply the same style to several different elements in a block, with line breaks before and after. Which tag should you use?
<span>
<div>
<style>
<src>
Which of the following selects all elements with the class footer that are inside of divs?
div { .footer { ... } }
.footer div { ... }
div > .footer { ... }
div .footer { ... }
Which of the following selects all a tags that are immediate children of div tags?
div > a { ... }
div a { ... }
div < a { ... }
div + a { ... }
Why is it important to avoid repetitive code while creating a website?
Excessive code is harder to read and understand
It is easier to make edits to websites when CSS rules are strategically grouped and organized
It demonstrates good coding style
All of the above
Which of the following will turn the first letter of all p elements blue?
p::first-letter {
color=blue;
}
p:first-letter {
color=blue;
}
p::first-letter {
color: blue;
}
p:first-letter {
color: blue;
}
Which of the following selects images as the mouse hovers over them and sets their size to 350px by 350px?
img:hover { width: 350px; height: 350px; }
img :hover { width: 350px; height: 350px; }
img::hover { width: 350px; height: 350px; }
img > hover { width: 350px; height: 350px; }
Which of the following settings will not make an element invisible?
visibility: hidden
appearance: off
opacity: 0
display: none
True or False: Only CSS has online documentation because it is a more complex language than HTML.
True
False
True or False: None of the changes you make in the Inspector will be saved.
True
False
Which of the following defines border thickness so that the top and bottom borders are 10px thick and left and right borders are 5px thick?
border: 5px 10px 5px 10px;
border: 5px 5px 10px 10px;
border: 10px 10px 5px 5px;
border: 10px 5px 10px 5px;
Which of the following applies the invert filter to all images with the class “inverted”?
img.inverted {
filter: invert(0);
}
img.inverted {
filter: invert;
}
img inverted {
filter: invert(100%);
}
img.inverted {
filter: invert(100%);
}
Which of the following defines an animation change-color that changes the font color from green to red?
@keyframes change-color {
from {color: green;}
to {color: red;}
}
@animation change-color {
from {color: green;}
to {color: red;}
}
@keyframes change-color {
color: {color: green, red;}
}
@animation change-color {
color: {color: green, red;}
}
Which of the following will result in a smooth transition from green to red as the mouse clicks on h1 tags?
h1 {
color: green;
transition: color 2s;
}
h1:active {
color: red;
}
h1 {
color: green;
transition: color 2s;
}
h1:hover {
color: red;
}
h1 {
color: green;
}
h1:active {
color: red;
}
h1 {
color: green;
}
h1:hover {
color: red;
}
In this code, what is the term for the h1?
h1 {
color: red;
font-size: 5em;
}
selector
combinator
declarator
markup
What will this loop print?
let max = 3;
for (i = 0; i > max; i++) {
document.write("skrt ");
}
skrt skrt skrt
skrt skrt
skrt skrt skrt skrt
None of the above
Which choice is a correct use of the parseInt() function in Javascript that parses a string and return an integer?
parseInt("six");
parse_int('6');
parseInt("6");
parseint("6");
In the context of this code, how would you describe user?
const user = {
given_name: "Joe",
family_name: "Bloggs",
age: 40,
};
function
array
variable
object
Which array method should you apply to run a function for every item within an array, returning an array of all items for which the function is true?
every()
map()
forEach()
filter()
What are the best examples of void elements?
<link><meta><title>
<br><base><source>
<area><embed><strong>
What is the best way to apply bold styling to text?
<strong>
Using CSS
<bold>
<b>
What is the default method for form submission?
GET
POST
PUT
SUBMIT
_________ keyword is used to declare variables in javascript.
Dim
String
var
None of the above
What is DOM in HTML?
Language dependent application programming
Hierarchy of objects in ASP.NET
Application programming interface
Convention for representing and interacting with objects in html documents
What does MIME stand for?
Multipurpose Internet Mail Extra
Multi Internet Mail End
Multipurpose Internet Mail Email
Multipurpose Internet Mail Extensions
Which attribute is not essential under <iframe>?
frameborder
width
height
src
How many glyphs does bootstrap include?
369
360
260
100
Which of the following makes the button appear pressed?
.btn-link
.disabled
.active
.btn-block
Which of the following specifies header text of popover?
selector
title
placement
trigger
Some characters are reserved in HTML.
True
False
If you use the less than (<) or greater than (>) signs in your text, the browser might mix them with tags.
True
False
Character entities are used to display reserved characters in HTML.
To display a less than sign (<) we must write: < or <
True
False
A very uncommon entity in HTML is the non-breaking space:
True
False
A diacritical mark is something other than a "glyph" added to a letter.
True
False
Some diacritical marks, like grave ( ̀) and acute ( ́) are called accents.
True
False
Diacritical marks can appear both above and below a letter, inside a letter, and between two letters.
Diacritical marks can be used in combination with alphanumeric characters to produce a character that is not present in the character set (encoding) used in the page.
True
False
Reserved characters in HTML don't have to be replaced with character entities.
True
False
How will this line of code display?
<p>A</p><p>B</p><p>C</p>
A
B
C
A B C
ABC
A</p><p>B</p><p>C
Which statement is true about this line of code?
<p>Hello, <em>World!</em></p>
<em> is the closing tag
The code will not work since the sentence ends with !
</p> is the closing tag
The sentence will display as:
Hello,
World!
How will this line of code display?
<em>A</em><em>B</em><em>C</em>
A</em><em>B</em><em>C
A
B
C
A B C
ABC
What is class="class1" in this line of code?
<p class="class1">Hello World.</p>
ID
Embedded style
Attribute
Inline style
In this line of code, "Hello, World.", is the ___ of the ___.
<p>Hello, World.</p>
content, element
attribute, element
value, style
content, attribute
In this line of code, href tells the browser
<link ... href="styles/styles.css>
where to find the style sheet named styles.css.
that the styles.css file is in the same folder as the HTML page.
how many style sheets there are.
to ignore all other CSS style rules.
An absolute path to a file or website looks like:
<a href="www.example.com">
<a href="../example.com">
<a href="http://www.example.com">
<a href="http//:www.example.com">
<a href="/fruit/apples/fuji">
The href path is relative
The href path is absolute
The href path is fixed
The href path is above the current root folder.
The character entity code for the copyright symbol.
#@copy/
©
@copy;
&#copy;
< is the character entity for
<
>
/
@
> is the character entity for
>
<
/
"
"
<
*
#
"
&
&
*
"
#
'
"
'
#
/
The code for making a comment in HTML
<!-- comment -->
/* comment */
<-- comment --/>
/ comment
To groups the footer content in a table, we will use ...............
<tfooter>
<tbody>
<thead>
<table>
Semantic elements = elements with a meaning
True
False
<div> is semantic element
True
False
To group related data in the form, we will use
<fieldset>
<form>
<picture>
<style>
.................. element defines a drop-down list
<select>
<datalist>
<list>
<ol>
to add values in the drop down list, we will use .................
<option>
<li>
<caption>
<input>
................... attribute specifies that an input field is read-only.
readonly
required
placeholder
value
To add favicon in your page, we will use .........
<link>
<meta>
<style>
<script>
Most mathematical, technical, and currency symbols, are present on a normal keyboard.
True
False
Emojis look like images, or icons, but they are not.
They are letters (characters) from the UTF-8 (Unicode) character set.
True
False
UTF-8 covers almost all of the characters and symbols in the world, about 10,000.
True
False
Symbols that are not present on your keyboard can also be added by using entities.
True
False
ASCII was the first character encoding standard.
True
False
ASCII defines 128 different characters that could be used on the internet
True
False
ISO-8859-1 was the default character set for HTML 4. This character set supported 256 different character codes.
True
False
ANSI (Windows-1252) was the original Apple character set. ANSI is identical to ISO-8859-1, except that ANSI has 32 extra characters.
True
False
The HTML5 specification encourages web developers to use the UTF-8 character set, which covers almost all of the characters and symbols in the world!
True
False
Which is the correct default character set meta tag for HTML 5?
<meta char="ISO-8859-1">
<charset="UTF-8">
<meta charset="UTF-8">
<meta charset="WTH-5">
A URL can be composed of words (e.g. google.com), or an Internet Protocol (IP) address (e.g. 192.68.20.50).
True
False
Most people enter the name when surfing, because names are more acurate than numbers.
True
False
http - HyperText Transfer Protocol - Common web pages. Not encrypted
True
False
ftp - Formula Transfer Protocol - Downloading or uploading files.
True
False
URL encoding converts non-ASCII characters into a format that can be transmitted over the Internet.
True
False
Your browser will encode input, according to the character-set used in your page.
True
False
The default character-set in HTML5 is UTF-8.
True
False
URLs cannot contain spaces. URL encoding normally replaces a space with a plus (+) sign, or %20.
True
False
To display an HTML page correctly, a web browser doesn't need to know which character set to use.
True
False
