WorksheetsCOMPUTER QA 2.0
Total questions: 92
Worksheet time: 56mins
What does CSS stands for?
Cascading Style Sheet
Computer Style Sheet
Creative Style Sheet
Colorful Style Sheet
What is the correct HTML for referring to an external style sheet?
<link rel="stylesheet" type="text/css" href="mystyle.css">
<style src="mystyle.css">
<stylesheet>mystyle.css</stylesheet>
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
Which HTML tag is used to define an internal style sheet?
<style>
<script>
<css>
Which HTML attribute is used to define inline styles?
styles
font
style
class
Which is the correct CSS syntax?
{body:color=black;}
body:color=black;
{body;color:black}
body {color:black;}
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
Which property is used to change the background color?
bgcolor
color
background-color
How do you add a background color for all <h1> elements?
h1 {background-color:#FFFFFF;}
all.h1 {background-color:#FFFFFF;}
h1.all {background-color:#FFFFFF;}
<h1>background-color:#FFFFFF;</h1>
Which CSS property is used to change the text color of an element?
text-color
fgcolor
color
Which CSS property controls the text size?
font-size
text-style
font-style
text-size
What is the correct CSS syntax for making all the <p> elements bold?
p {font-weight:bold;}
<p style="text-size:bold;">
p {text-size:bold;}
<p style="font-size:bold;">
How do you display hyperlinks without an underline?
a {text-declaration:none;}
a {text-declaration:no-underline;}
a {decoration:no-underline;}
a {underline:none;}
How do you make each word in a text start with a capital letter?
transform:capitalize
you can't do that with CSS
text-transform:capitalize
text-style:capitalize
Which property is used to change the font of an element?
font-family
font-weight
font-style
How do you make the text bold?
font:bold;
font-weight:bold;
style:bold;
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 = 1 pixel?
border-width:10px 5px 20px 1px;
border-width:5px 20px 10px 1px;
border-width:10px 20px 5px 1px;
border-width:10px 1px 5px 20px;
Which property is used to change the left margin of an element?
margin-left
padding-left
indent
When using the padding property; are you allowed to use negative values?
no
yes
How do you make a list that lists its items with squares?
list-type:square;
list-style-type:square;
list:square
How do you select an element with id 'demo?
#demo
.demo
*demo
demo
How do you select elements with class name 'test'?
.test
*test
#test
test
How do you select all p elements inside a div element?
div.p
div p
div + p
How do you group selectors?
separate each selector with a comma
separate each selector with a plus sign
separate each selector with a space
What is the default value of the position property?
fixed
relative
static
scroll
Which value of background-repeat ensures the image does not repeat?
no-repeat
repeat-x
repeat-y
none
What is the default behavior of the background-repeat property?
The image repeats only horizontally.
The image repats only vertically.
The image repeats both horizontally and vertically.
The image does not repeat.
When using a background-image, it is important to:
Set the opacity of the image.
Use an image that does not disturb the text.
use RGB values with an alpha channel.
Which of the following is the correct way to set a background image?
background-image: "image.jpg";
background-image: (image.jpg);
background-image: url("image.jpg");
background-image= url(image.jpg);
What is the default behavior of the background-image property?
The image is not repeated.
The image repeats to cover the entire element.
The image is stretched to cover the element.
The image is tiled only horizontally.
What CSS property is used to set a background image?
background-img
background-image
background-url
image-background
Which RGBA value represents a fully transparent green background?
rgba(0, 255, 0, 1)
rgba(0, 255, 0, 0)
rgba(0, 255, 0, 0.5)
rgba(0, 255, 0, 0.3)
What is the valid range for the CSS opacity property?
0.0 to 1.0
0 to 100
1 to 100
0 to 255
Which CSS selector is used to select an element with a specific id?
*
.
#
%
Which of the following is the correct syntax to select all <p> elements with the class 'highlight'?
p.highlight
.highlight p
p#highlight
#highlight p
What does the universal selector ( * ) do in CSS?
Selects elements with a specific id.
Selects all HTML elements on the page
Selects elements with a specific class.
Groups multiple selectors together.
Multiple CSS declarations are separated with semicolons ( ; ).
true
false
In CSS, font-size is:
a selector
a value
a property
an element
Which of the following is a valid CSS declaration?
color: red;
text-align red;
font-weight = bold;
backgroundcolor red
What does a 'CSS rule' consist of?
A selector and a declaration block
a declaration block and an attribute
a declaration block and a style
In the following example, which part is the selector?
p {color: red;}
p
{color: red;}
color
red
Two of the following HTML elements makes the text bold, which two?
<em>and<b>
<strong>and<b>
<big>and<b>
<mark>and<b>
Which of the following headers is the largest and most important header?
<h1>
<h2>
<h3>
<h4>
<h5>
Empty elements must have a close tag.
true
false
What is the correct HTML markup for the document type declaration?
<!DOCTYPE html>
DOCTYPE html;
--DOCTYPE html;
Who invented HTML?
Tim Berners-Lee
Brendan Eich
Guido van Rossum
Which of the following is the correct tag to include an external CSS file?
link
style
script
meta
How can you change the look of an entire website by changing just one file?
With an internal style sheet
With an external style sheet
With inline CSS
With browser default styles
Add an external style sheet with the url: "mystyle.css".
<link rel="stylesheet" href="mystyle.css">
<link="stylesheet" href="mystyle.css">
<ref url="stylesheet" href="mystyle.css">
Which of the following methods for inserting a style sheet has the highest priority?
browser default
external CSS
internal CSS
inline CSS
Set the page's background color to red.
(separate your answer with a comma and space)
(a)
Which of the following is the correct CSS properties to style the <h1> element property?
color
text-align
font-size
red
Set the page's background color to red, by using an inline style.
(a)
Insert the missing parts to make the CSS code correct.
(separate your anser with a comma and space)
(a)
Which of the following is a predefined color name in CSS?
RedGreenBlue
blue
RGB
HEX
What is the correct syntax to set a background color in CSS?
background-clr: color;
bg-color: red;
background-color: blue;
color-background: blue;
Which of the following is the correct value to set the background color of <h1> to DodgerBlue.
Tomato
DodgerBlue
MediumSeaGreen
Dodger Blue
Which of the following is the correct property and value to set the text color of <p> to red.
color
text-color
red
bg-color
background-color
Which of the following is the correct property and value to set the border color <p> to green?
bg-color
border
green
line
br
Which of the following is the correct property to set a green background color for a <div> element?
bg-color
color
opacity
background-color
Which of the following are the correct property and value to set a blue background color for a <div>?
background-color
bg-color
rgb(blue)
#blue
blue
Set the background color of the <h1> element to "lightblue".
(a)
Which of the following are the correct property and value to set a red background color for a <div>?
color
bg-color
#red
background-color
red
Which of the following are the correct property and value to repeat the background image horizontally?
backround-position
packground-image
background-repeat
repeat-y
repeat-x
Make the background image repeat only vertically.
(separate your answer with a comma and space)
(a)
Which of the following is the correct value to ensure the background image does not repeat?
no-repeat
repeat-x
repeat-y
Specify that the background image should be shown once, in the top right corner.
(separate your answer with a comma and space)
(a)
Use the correct background property to make the background image NOT scroll with the rest of the page.
(separate your answer with a comma and space)
(a)
Which of the following are the correct property and value to make the background image scroll with the page?
background-position
background-attachment
fixed
no-scroll
scroll
Which of the following is the correct value to set the background color to red?
red
#red
url
right top
fixed
Which of the following is the correct value to specify the background image?
background-color
no-repeat
img:img_tree.png
url("img_tree.png")
Which of the following is the correct value to make sure the background image does not repeat?
repeat
repeat-x
no-repeat
repeat-y
stop-repeat
Which of the following headers has the correct HTML syntax?
<h1>Welcome</h1>
{{h1}}Welcome{{:h1}}
{h1:Welcome}
What is the correct syntax for an HTML hyperlink?
<a href="/home.htm>Visit W3Schools.com!</a>
<link href="/home.htm">Visit W3Schools.com!</link>
<a link href="/home.htm">Visit W3Schools.com!</alink>
Write TRUE if the statement is correct and if not, change the underlined word/s with the correct answer.
CSS STANDS FOR CASTING STYLE SHEETS.
(a)
Write TRUE if the statement is correct and if not, change the underlined word/s with the correct answer.
CSS HAS GIVEN WEB DESIGNERS MORE CONTROL ON THE DESIGN OF THEIR WEBSITES.
(a)
Write TRUE if the statement is correct and if not, change the underlined word/s with the correct answer.
tHE EXTERNAL STYLE SHEET APPLIES THE STYLES TO A PARTICULAR WEB PAGE.
(a)
Write TRUE if the statement is correct and if not, change the underlined word/s with the correct answer.
THE INLINE STYLE SHEET APPLIES STYLES ACROSS ALL WEB PAGES.
(a)
Write TRUE if the statement is correct and if not, change the underlined word/s with the correct answer.
THE DECLARATIONS OF A SELECTOR ARE SEPARATED BY A COLON (:).
(a)
The file extension when saving a CSS file is (a) .
The color purple of the property is applied to the value when a colon (:) is not entered.
true
false
Indenting the declarations affects the output of a web page.
true
false
The Save All command is an efficient way to save opened files.
true
false
The text within the comment tag affects the output of a web page.
true
false
Comments are not displayed in the browser.
true
false
Where can CSS comments be added?
Only at the beginning of a CSS file
Anywhere within the CSS code
Only at the end of CSS declarations
CSS does not support comments
Complete the comment in the CSS code.
/*
#
//
*
*/
(a)
A text editor like Notepad++ cannot used to create CSS file.
true
false
(a) are descriptions or simple notes in the source code.
Write TRUE if the statement is correct and if not, change the underlined word/s with the correct answer.
USE ID SELECTOR TO APPLY THE SAME STYLES TO MULTIPLE ELEMENTS.
(a)
A comma separates the value with the succeeding sets of properties and values.
true
false
