Quizzes of the semester CSC 365

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

The pseudo-class selectors such as :visited and :hover are typically applied to what element? a) a b) nav c) li d) ul

a) a

Suppose the fixed width of an aside element in a fixed layout is 300 pixels, and the fixed width of its parent element (body) is 900 pixels. If you convert the page from fixed to fluid layout, the width of the aside should be set to a)33.33% b).3333 c)300% d)3

a)33.33%

The <a> element that follows a)<a href="update.html">Update</a> b)displays "Update" as a link c)displays "update.html" as a link d)displays "Update" as plain text> e)displays "update.html" as plain text

a)<a href="update.html">Update</a>

Use the _____ element to associate a web page with an External Style Sheet. a)<link> b)<style>...</style> c)<target> d)<include>...</include>

a)<link>

Image format that supports millions of colors and transparency a)PNG b)GIF c)JPG d)BMP

a)PNG

When the DOM is changed by JavaScript, the changes a)are immediately shown in the browser window b)are shown the next time the page is loaded c)are shown when the page is refreshed d)are shown when the user takes the next action

a)are immediately shown in the browser window

In the following CSS code, em is the ____________. a)em { color: red;) b)selector c)property d)value e)style declaration

a)em { color: red;)

When scripting the DOM with JavaScript, the $ sign is commonly used a)for the name of a function that gets the element with the specified id. b)for the name of the event handler that is triggered when a page is loaded c)to refer to the document object d)to refer to the current node in the DOM

a)for the name of a function that gets the element with the specified id.

To apply the same style set to both the h1 and the h2 elements, you would use a)h1, h2 b)h1 h2 c)h1 + h2 d)h1 and h2

a)h1, h2

In HTML, a numbered list is referred to as a/an _______________________ list. a)ordered b)numeric c)description list d)unordered

a)ordered

Suppose a footer element in a fixed layout has a width of 600 pixels, and the font size of its parent element (body) is 15 pixels. Which of the following is the correct conversion from fixed to responsive of the style rule: padding: 15px; a)padding: 1em 2.5%; b)padding: 2.5%; c)padding: 1em; d)padding: 2.5% 1em;

a)padding: 1em 2.5%;

By default, the <br> tag a)starts a new line of text b)creates a link c)breaks a page into two parts d)displays text in bold

a)starts a new line of text

When you use media queries for responsive web design, a)the styles for one media query are inherited by the media queries that follow b)the styles for each media query are independent c)the first media query sets the styles for the largest device d)the first media query sets the styles for the smallest device

a)the styles for one media query are inherited by the media queries that follow

When you use the float property for page layout, you should also set a)the width of the floated elements b)the height of the floated elements c)the margins and padding of the floated elements d)the width and height of the floated elements

a)the width of the floated elements

​Data cells that do not function as headers for table rows or columns are marked using the _____ element. a)​td ​b)tt ​c)tr ​d)th

a)​td

The syntax for CSS comments looks like: a)<!-- comments go here b)/* comments go here */ c)// comments go here // d)all of these will work in CSS

b)/* comments go here */

Use the _____ element to code embedded styles on a web page. a)<link> b)<style>...</style> c)<embed>...</embed> d)<include>...</include>

b)<style>...</style>

Which of the following is true about inline styles? a)Inline styles are encouraged since they increase maintainability b)An inline style only affects the element it is defined within and will override other styles for that element's property. c)Inline styles will be overridden by the external stylesheet d)Inline styles are encouraged since they decrease bandwidth

b)An inline style only affects the element it is defined within and will override other styles for that element's property.

Which of the following should you do to provide accessibility to img elements with useful content? a)Code an src attribute with an absolute URL. b)Code an alt attribute that describes the image. c)Use a PNG image. d)Provide an alternate image.

b)Code an alt attribute that describes the image.

When you create an image map for an image element, you use a)CSS to specify the map and hotspot areas b)HTML to specify the map and area elements for the img element c)CSS to specify the pages that the hotspots link to d)the HTML for the img element to specify the the pages that the hotspots link to

b)HTML to specify the map and area elements for the img element

When CSS is coded in the body of the web page as an attribute of an HTML tag it is called _____. a)Embedded b)Inline c)External d)Imported

b)Inline

Given the same JavaScript in an external file named printPage.js var $ = function (id){ return document.getElementById(id); } var printPage = function() { window.print(); } window.onload = function() { $("printButton").onclick = printPage; What does the window.onload function do? a)Prints the page b)Sets up the event handler named printPage c)Prints the page when the button with its id set to printButton is clicked d)Calls the printPage function when the button with printBotton as its id is clicked

b)Sets up the event handler named printPage

A child selector in CSS allows you to select elements that a)are any descendant of an element b)are a direct descendant of an element c)have an attribute that matches the specified child d)have a class that matches the specified child

b)are a direct descendant of an element

If you want to apply styles to all <p> elements that are direct children of an h1 element, how do you code the selector? a)h1+p b)h1>p c)h1~p d)h1 p

b)h1>p

The <a> element that follows goes to a web page... <a href="books/javscript.html">JavaScript and DOM Scripting</a> a)in the same folder as the current page b)in a folder that is subordinate to the current page c)in another folder that is at the same level as the current page d)in a folder that is subordinate to the root folder for the web site

b)in a folder that is subordinate to the current page

JavaScript is most commonly used to modify the contents of a web page a)when the page is loaded b)in response to a user action c)when the images of a page are loaded d)in response to web server actions

b)in response to a user action

Which of the following is NOT a sectioning element? a)nav b)p c)article d)section

b)p

The box model consists of a content area surrounded by: a)a border b)padding, border, and margin c)border and margin d)spacing, border, and margin

b)padding, border, and margin

The title element in the head section of an HTML document specifies the text a)that's used to refer to the document b)that's displayed in the title bar of the browser c)that's displayed in the status bar of the browser d)that's used to refer to the application

b)that's displayed in the title bar of the browser

Which of the following is NOT a way to include JavaScript in the HTML for a web page? a)use a script element to load an external JavaScript file b)use an embed element to load an external JavaScript file c)embed JavaScript in a script element in the head section d)embed JavaScript in a script element in the body section

b)use an embed element to load an external JavaScript file

Given the same JavaScript in an external file named printPage.js var $ = function (id){ return document.getElementById(id); } var printPage = function() { window.print(); } window.onload = function() { $("printButton").onclick = printPage; Which function or method actually prints the page? a)printPage b)window.print() c)window.onload d)printButton

b)window.print()

When you code a font-family property in a style rule, a)you must specify either a serif or non-serif font b)you can specify more than one font name c)you usually use a universal selector d)the font applies only to the elements specified by the selector

b)you can specify more than one font name

Which of the following selectors applies to all <a> elements with "hot" as their class name that are coded within a div element that has "header" as its id? a)a.hot #header b)a.hot > header c)#header a.hot d)#header a:hot

c)#header a.hot

Which of the following is a valid selector for a class named menu? a)menu b)#menu c).menu d)>menu

c).menu

Use _______ element to indicate column or row headings. a)<thead> b)<head> c)<th> d)<td>

c)<th>

Which of the following programs is not an image editor? a)Adobe Photoshop b)GIMP c)Adobe Dreamweaver d)Microsoft Paint

c)Adobe Dreamweaver

Which of the following do you NOT have to do to create a scalable image whose width is limited to its native size? a)Remove the image's height and width properties from the HTML b)Set the image's width property to 100% c)Set the image's height property to "auto" d)Set the image's max-width property to the width of the image in pixels

c)Set the image's height property to "auto"

Which of the following is true about image formats? a)The GIF image format supports transparent backgrounds and can display millions of colors; therefore, they are the best file format to use for photographs on the web. b)The JPG image format supports transparent backgrounds and millions of colors; therefore, they are the best file type to use for photographs on the web. c)The GIF image format supports transparent backgrounds, but can only display a maximum of 256 colors; therefore, they should not be used for photos on the web. d)The JPG image format supports transparent backgrounds, but can only display a maximum of 256 colors; therefore, they should not be used for photos on the web.

c)The GIF image format supports transparent backgrounds, but can only display a maximum of 256 colors; therefore, they should not be used for photos on the web.

When aterm-24 web page contains both a link to an external stylesheet and embedded styles, which of the following is true? a)The embedded styles will be applied first, and then the external styles will be applied. b)The external styles will override the embedded styles. c)The external styles will be applied first, then the embedded styles will be applied. d)The styles will conflict and the default browser styles will be applied.

c)The external styles will be applied first, then the embedded styles will be applied.

When do you need to use a fully qualified, absolute URL in a hyperlink? a)When creating a link to a location on the same web page. b)When linking to a page in another folder on the same site. c)When linking to a page on an external web site. d)Never

c)When linking to a page on an external web site.

A valid HTML document requires: a)a page element and a div element b)a head element and a page element c)a head element and a body element d)a body element and a div element

c)a head element and a body element

What character entity is created by the &nbsp; character? a)® b)© c)a space d)&

c)a space

Which of the following units of measurement is equal to the font size for the current font? a)a pixel b)a point c)an em d)a percentage

c)an em

When you create an image map, you use an area element to define each hotspot along with a)a use map attribute that identifies the related image b)a hotspot attribute that identifies the number of hotspots c)an href attribute that identifies the page that the hotspot links to d)a map attribute that gives the names of the hot spots

c)an href attribute that identifies the page that the hotspot links to

The DOM for a web page is built a)before the page is loaded b)after the page is loaded c)as the page is loaded d)when the DOM is needed

c)as the page is loaded

The img element that follows gets the image file from the images folder, which is <p><img src="x" alt="Murach Logo"></p> a)at the level above the current folder b)at the level below the current folder c)at the same level as the current folder d)at two levels above the current folder

c)at the same level as the current folder

Which of the following is NOT one of the ways that you can specify a a)color in CSS? b)color: white; c)color: rgb(50%, 25%, 25%); d)color: getColor("red");

c)color: rgb(50%, 25%, 25%); d)color: getColor("red");

The img element that follows <p><img src="../images/logo.gif" alt="Murach Logo"></p> a)displays "Murach Logo" above the image that's retrieved b)displays "Murach Logo" within a p element c)displays "Murach Logo" if the image can't be found d)displays the image as text within a p element

c)displays "Murach Logo" if the image can't be found

The dd and dt elements are nested within what other element? a)li b)ul c)dl d)ol

c)dl

JavaScript is a scripting language that runs a)on the JavaScript website b)in the JavaScript compiler of the web server c)in the JavaScript engine of the browser d)in the JavaScript engine of the web server

c)in the JavaScript engine of the browser

To adjust the appearance of a web page to different device sizes, you use a)fluid layout b)liquid layout c)media queries d)scalable images

c)media queries

Using tables for ____________ is not recommended because the HTML markup is not semantically correct. a)spreadsheet data b)numeric data c)page layout d)tabular data

c)page layout

Given the same JavaScript in an external file named printPage.js var $ = function (id){ return document.getElementById(id); } var printPage = function() { window.print(); } window.onload = function() { $("printButton").onclick = printPage; Which of the three JavaScript functions are event handlers? a)$, printPage, and window.onload b)$ and printPage c)printPage and window.onload d)printPage

c)printPage and window.onload

When you develop responsive web pages, you use a meta element in the HTML to a)tell the browser that the page is responsive b)specify that media queries will be used c)set the width of the viewport to the device width d)let the user change the size of the browser window

c)set the width of the viewport to the device width

In a 3-column layout that uses floating for page layout, you need to use CSS to a)stop any floating in the header b)set the width of the header c)stop any floating in the footer d)set the width of the footer

c)stop any floating in the footer

Select the item below that lists elements used in an HTML table: a)thead, body, tr b)table, tr, tt c)table, tr, td d)table, head, tfoot

c)table, tr, td

Which of the following image types can be enlarged without any loss of quality? a)raster b)bitmap c)vector d)none of these

c)vector

When you use ems or percentages to size fonts a)the font size is relative to the browser's default font size b)the font size is relative to the font size specified for the body c)the font size changes as the size of the viewport changes d) the font size changes as the size of the font used by its parent element changes

d) the font size changes as the size of the font used by its parent element changes

The purpose of the _______ element is to provide a title and briefly describe the contents. a)<title> b)<head> c)<source> d)<caption>

d)<caption>

What else is true about using a Markup Validation Service? a)It will show how the page will be rendered b)It provides you with alternative elements c)It will correct indentation errors d)It will correct any HTML syntax errors

d)It will correct any HTML syntax errors

​Identify a true statement to determine the number of columns in a a)web table. ​b)The number of columns is equal to number of rows in a web table. ​c)The number of columns is equal to number of caption elements. ​d)The number of columns is the total number of cells in a web table.

d)The number of columns is the total number of cells in a web table.

Within a CSS rule set, a declaration (rule), includes a)a selector and a declaration block b)a selector and a value c)a property and a selector d)a property and a value

d)a property and a value

When using a Markup Validation Service, a)you need to validate all pages of your site b)you can be sure that a validated page will work correctly in a browser c)the page won't run in a browser if it isn't valid d)a single coding error can cause multiple validation errors

d)a single coding error can cause multiple validation errors

If you want to style multiple web pages on a web site in the same way, it is best to use: a)inline styles b)embedded styles c)an internal stylesheet d)an external stylesheet

d)an external stylesheet

You should use the ______________ element to identify a section of a web page only when the HTML5 semantic elements don't apply. a)main b)hr c)section d)div

d)div

The smallest heading element is _______. a)h1 b)h0 c)h7 d) h6

d)h6

If you want to apply styles to all of the li elements within a main element, how do you code the selector? a)main+li b)main>li c)main~li d)main li

d)main li

The biggest benefit of using a browser's developer tools to inspect the styles that are applied to an HTML document is that you can a)see all the styles for an HTML document b)see how the styles from the current style sheet are applied to the HTML elements c)see all the elements in the HTML file d)see how the styles from one source override the styles from another source

d)see how the styles from one source override the styles from another source

The DOM for a web page provides a hierarchy of nodes that represent a)the elements, contents, and attributes in the HTML b)the elements, attributes, and comments in the HTML c)the contents, attributes, and comments in the HTML d)the elements, contents, attributes, and comments in the HTML

d)the elements, contents, attributes, and comments in the HTML

The text-decoration property in a style rule is commonly used a)to underline text b)to overline text c)to strike through text d)to remove underlines from links

d)to remove underlines from links

When you set the float property for a block element to left, the elements that follow it will flow into the space a)to the left of the floated element b)to the right of the floated element c)to the left of the floated element if there's enough space d)to the right of the floated element if there's enough space

d)to the right of the floated element if there's enough space

The location of CSS style rules can be (choose the best answer) a)inline b)embedded c)external d)you can combine all three

d)you can combine all three

​What is the purpose of colspan in <td colspan="7">? ​a)It sets each cell to span the eighth row within its column into equal parts. ​b)It sets each cell to span seven rows within its column. ​c)It sets each cell to span the eighth column within its row into equal parts. d)​It sets each cell to span seven columns within its row.

d)​It sets each cell to span seven columns within its row.

​A table contains five columns where one of the cells in a row spans three columns. Identify the number of table cells that will exist in that row. ​a)Six ​B)Three ​c)Five ​d)Four

​B)Three

​To add the comment, Welcome John Smith, the syntax would be _____. ​a)<---Welcome John Smith> b)​< !/--- Welcome John Smith--> ​c)<!--Welcome John Smith --> d)<!--Welcome John Smith !-->

​c)<!--Welcome John Smith -->

​Which of the following HTML elements is used to create a table title? ​a)<style> ​b)<span> ​c)<caption> ​d)<table>

​c)<caption>

​Identify the three row groups supported by HTML. ​a)thead, tfoot, and tborder ​b)thead, tborder, and tbody ​c)thead, tfoot, and tcell ​d)thead, tbody, and tfoot

​d)thead, tbody, and tfoot


संबंधित स्टडी सेट्स

16th Century Art in Italy and Northern Europe

View Set

Entrepreneurship I Lesson 3 Vocabulary

View Set

World History Exam 1a ch. 1-3, pages 3-86

View Set

Ch 10 Concepts of Emergency and Disaster Preparedness

View Set

ap psych - U5 practice questions

View Set