HTML Assessment/CSS Assessment
Which is the selector for a link? a) a { } b) link { } c) href { } d) a href { }
a) a { }
What property changes the border for an image/table? a) border: b) border-size: c) border-color: d) border-change
a) border:
Which doctype is correct for HTML5? a) <!DOCTYPE html> b) <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 5.0//EN" "http://www.w3.org/TR/html5/strict.dtd"> c) <!DOCTYPE HTML5>
a) <!DOCTYPE html>
In HTML, you can embed SVG elements directly into an HTML page. a) True b) False
a) True
How do you select an element with id "demo"? a) #demo b) .demo c) demo d) *demo
#demo
What is the correct HTML for inserting an image? a) <input type="dropdown"> b) <list> c) <select> d) <input type="list">
<select>
The HTML <canvas> element is used to: a) draw graphics b) manipulate data in MySQL c) display database records d) create draggable elements
a) draw graphics
Which CSS code is buggy? a) link {color: blue;} b) li {background-color: red;} c) p {font-size: 10px;} d) img {width: 100%;}
a) link {color: blue;}
What is the correct HTML for making a checkbox? a) <check> b) <input type="checkbox"> c) <checkbox> d) <input type="check">
d) <input type="check">
What is the correct HTML element for inserting a line break? a) <br> b) <break> c) <lb> d) <st>
a) <br>
Inline elements are normally displayed without starting a new line. a) True b) False
a) True
Select the code below that uses CSS to configure a background color of #000000 for a web page. a) body { background-color: #000000; } b) body { bgcolor: #000000; } c) document { background-page: #000000; } d) None of these
a) body { background-color: #000000; }
What is the correct HTML for adding a background color? a) <background>yellow</background> b) <body style="backgroundcolor:yellow;"> c) <body bg="yellow">
b) <body style="backgroundcolor:yellow;">
How can you make a numbered list? a) <list> b) <ol> c) <dl> d) <ul>
b) <ol>
Choose the correct HTML element to define important text a) <i> b) <strong> c) <b> d) <important>
b) <strong>
Which HTML tag is used to define an internal style sheet? a) <script> b) <style> c) <css> d) <stylesheet>
b) <style>
How can you make a bulleted list? a) <ol> b) <ul> c) <list> d) <dl>
b) <ul>
What is the correct HTML element for playing video files? a) <movie> b) <video> c) <media> d) <audio>
b) <video>
A selector (ex: h1{ } ) can only have 1 property a) true b) false
b) false
Which HTML element is used to specify a footer for a document or section? a) <bottom> b) <footer> c) <section>
b) footer
What is the correct HTML for making a text input field? a) <textinput type="text"> b) <input type="textfield"> c) <textfield> d) <input type="text">
d) <input type="text">
How do you select elements with class name "test"? a) #test b) test c) *test d) .test
d) .test
The code for the comment tag in CSS is a) <!-- comment --> b) <!-- comment > c) /* comment /* d) /* comment */
d) /* comment */*
Which HTML element defines navigation links? a) <navigation> b) <nav> c) <navigate>
b) <nav>
You should always define a backup font-family in CSS. a) True b) False
a) True
What unit of measurement does CSS use for size? a) px b) em c) % d) All work
d) All work
Which character is used to indicate an end tag? a) / b) * c) ^ d) <
a) /
Which HTML element defines the title of a document? a) <title> b) <meta> c) <head>
a) <title>
What is the correct HTML for creating a hyperlink? a) <a>http://www.w3schools.com</a> b) <a name="http://www.w3schools.com">W3Schools.com</a> c) <a href="http://www.w3schools.com">W3Schools</a> d) <a url="http://www.w3schools.com">W3Schools.com</a>
c) <a href="http://www.w3schools.com">W3Schools</a>
What is the correct HTML element for playing audio files? a) <mp3> b) <sound> c) <audio> d) <video>
c) <audio>
Which CSS code centers text? a) p {align: center;} b) p {text-align: center;} c) p {align=center;} d) p {center;}
b) p {text-align: center;}
What is the correct HTML for inserting a background image? a) <background img="background.gif"> b) <body style="backgroundimage:url(background.gif)"> c) <body background="background.gif"> d) <background.gif">
c) <body background="background.gif">
Choose the correct HTML element for the largest heading: a) <h6> b) <heading> c) <h1> d) <head>
c) <h1>
In HTML, onblur and onfocus are: a) Style attributes b) HTML elements c) Event attributes
c) Event attributes
An <iframe> is used to display a web page within a web page. a) False b) There is no such thing as an <iframe> c) True
c) True
Which is correct CSS syntax? a) { body; color=black;} b) body: color= black c) body {color:black;} d) (body color is black)
c) body {color:black;}
Which is the correct way to format a Font Family for a paragraph? a) p { font-face: Arial; } b) p { family-font: Arial; } c) p { font-family: Arial; } d) p { font: Arial; }
c) p { font-family: Arial; }
Which is the Value in the CSS? p {color: red;} a) p b) color c) red d) {}
c) red
In HTML, which attribute is used to specify that an input field must be filled out? a) validate b) placeholder c) required d) formvalidate
c) required
Graphics defined by SVG is in which format? a) CSS b) XML c) HTML
b) XML
How do I remove the underline from a link using CSS? a) a {underline: none;} b) a {text-decoration: none;} c) a {style: none;} d) link {underline: none;}
b) a {text-decoration: none;}
What is the correct HTML for making a drop-down list? a) <list> b) <select> c) <input type="list"> d) <input type="dropdown">
<select>
How can you open a link in a new tab/browser window? a) <a href="url" target="_blank"> b) <a href="url" target="new"> c) <a href="url" new>
a) <a href="url" target="_blank">
What is the correct HTML for referring to an external style sheet? a) <link rel="stylesheet" type="text/css" href="mystyle.css"> b) <style src="mystyle.css"> c) <stylesheet>mystyle.css</stylesheet> d) <stylesheet mystyle.css> </stylesheet>
a) <link rel="stylesheet" type="text/css" href="mystyle.css">
Which of these elements are all <table> elements? a) <table><tr><td> b) <thead><body><tr> c) <table><head><tfoot> d) <table><tr><tt>
a) <table><tr><td>
How do you group selectors? a) Separate each selector with a comma b) Separate each selector with a space c) Separate each selector with a plus sign d) You cannot do that
a) Separate each selector with a comma
Choose the correct HTML element to define emphasized text a) <italic> b) <em> c) <i> d) <emp>
b) <em>
What does CSS stand for? a) Creative Style Sheets b) Cascading Style Sheets c) Colorful Style Spread d) Computer Style Spread
b) Cascading Style Sheets
What does HTML stand for? a) Home Tool Markup Language b) Hyper Text Markup Language c) Hyperlinks and Text Markup Language
b) Hyper Text Markup Language
HTML comments start with <!-- and end with --> a) False b) True
b) True
Which is the property in this CSS? p {color: red;} a) p b) color c) red d) :
b) color
Which is the correct way to format a Font Family for a paragraph? (Hint: make sure you have more than one backup font!) a) p { font-face: Arial, Verdana, San-Serif; } b) p { font-family: Arial, Verdana, San-Serif; } c) p { family-font: Arial, Verdana, San-Serif;} d) p { font: Arial, Verdana, SanSerif;}
b) p { font-family: Arial, Verdana, San-Serif; }
If you want to have more than one declaration in a CSS rule, what character separates them? a) comma , b) semi-colon ; c) colon : d) period .
b) semi-colon ;
Which CSS code is incorrect? a) a {color: blue;} b) p {font-size: 10px;} c) body {backgroundcolor="red";} d) img {width: 100%;}
c) body {backgroundcolor="red";}
Which is the value in this CSS? p {color: red;} a) p b) color c) red
c) red
How do you make each word in a text start with a capital letter? a) text-transform:capitalize b) You can't do that with CSS c) text-transform:uppercase d) text-transform:lowercase
c) text-transform:uppercase
What symbols go around the properties for each CSS selector? a) < > b) [ ] c) { } d) ( )
c) { }
The HTML global attribute, "contenteditable" is used to: a) Specifies a context menu for an element. The menu appears when a user rightclicks on the element b) Update content from the server c) Return the position of the first found occurrence of content inside a string d) Specify whether the content of an element should be editable or not
d) Specify whether the content of an element should be editable or not
Which input type defines a slider control? a) slider b) search c) controls d) range
d) range
Which HTML attribute is used to define inline styles? a) font b) styles c) style d) class
d) style
What is the correct HTML for making a text area? a) <textarea> b) input type="textbox"> c) <input type="textarea"> d) <text>
a) <textarea>
Where in the HTML document is the correct location to insert code to link to your external CSS? a) In the <head> section b) In the <body> section c) At the very end of the document d) At the very beginning of the document
a) In the <head> section
Which is the selector in this CSS? p {color: red;} a) p b) color c) red d) ;
a) p
Which is the correct way to specify the color of a paragraph of text? a) p { color:#ff0000; } b) p { text-color:#ff0000; } c) p { font-color: #ff0000; } d) p { font-text-color: #ff0000; }
a) p { color:#ff0000; }
Block elements are normally displayed without starting a new line. a) True b) False
b) False
Which HTML attribute specifies an alternate text for an image, if the image cannot be displayed? a) alt b) title c) src d) longdesc
b) src
Which HTML element is used to specify a header for a document or section? a) <head> b) <top> c) <header> d) <section>
c) <header>
In HTML, what does the <aside> element define? a) The ASCII character-set; to send information between computers on the Internet b) Content aside from the page content c) A navigation list to be shown at the left side of the page
c) A navigation list to be shown at the left side of the page