
































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Practice questions and answers related to html5, covering topics such as html5 apis, structure elements, code validation, audio and video elements, and responsive design. It is designed to help students prepare for objective assessments and gain a better understanding of html5 concepts. The questions cover a range of topics, including the use of html5 apis, the structure of web pages, code validation, and the incorporation of audio and video elements. It also addresses the importance of responsive design and the use of cascading style sheets (css).
Typology: Exams
1 / 72
This page cannot be seen from the preview
Don't miss anything!

































































HTML5 APIs can be used to: A) determine how to display HTML elements in your Web pages. B) call another location in the Web page or a separate Web page when the API is selected. C) provide a development environment that enables the seamless use of proprietary browser plug -ins. D) create apps for mobile devices. - correct answer -create apps for mobile devices.
HTML5 has introduced specific elements to structure Web pages. In whi ch structure element should you include hypertext menus to access various pages of the Web site? A) The structure element B) The structure element C) The structure element D) The structure element - correct answer -The structure element
What is an advantage of using HTML5 APIs when designing Web pages for mobile devices? A) HTML5 APIs use fewer resources than a proprietary browser plug-in does, such as battery power and CPU memory. B) HTML5 APIs streamline the application of proprietary browser plug-ins when plug-ins are included in Web pages designed for mobile devices. C) HTML5 APIs make Web pages non-responsive to varying user screen sizes, thereby saving battery power and CPU memory. D) HTML5 APIs eliminate the need for Cascading Style Sheets, thereby saving battery power and CPU memory. - correct answer -HTML5 APIs use fewer resources than a proprietary browser plug-in does, such as battery power and CPU memory.
Code validation is the process of: A) creating code that responds to user screen size. B) accessing another point in a Web page or separate Web page. C) determining how to display HTML elements in your Web page.
D) checking your code to verify that it complies with the syntax rules for your chosen standard. - correct answer -checking your code to verify that it complies with the syntax rules for your chosen standard.
Consider the following HTML code:
Your browser does not support the HTML5 audio element.
Which attribute and value must you add to the element to incorporate default audio operations such as Play, Pause, Volume, etc.? A) controls="controls" B) controls="default" C) controls="audio" D) controls="yes" - correct answer -controls="controls"
Which of the following can be considered a benefit of developing Web pages using the "Web development trifecta"? A) You can create Web pages without the need for page structure elements to define the document structure. B) You can create Web pages without the need for hyperlinks. C) You can create Web pages that no longer need to be validated to an HTML standard in order to properly render in any browser or device. D) You can create Web pages that easily adapt to smartphones, tablets, gaming devices and smart TVs, as well as to traditional computers. - correct answer -You can create Web pages that easily adapt to smartphones, tablets, gaming devices and smart TVs, as well as to traditional computers.
What does the W3C Markup Validation Service use to determine the HTML specification against which to validate your Web page markup code? A) The specified DTD in the section of your HTML page B) The specified DTD in the section of your HTML page C) The declaration in the section of your HTML page D) The specified DTD in the declaration on your HTML page - correct answer -The specified DTD in the declaration on your HTML page
What attribute should you add to the element if you want your audio to play over and over again without stopping? A) autoplay="autoplay" B) loop="autoplay" C) autoplay="loop" D) loop="loop" - correct answer -loop="loop"
What can you do to ensure that your Web page content is rendered appropriately regardless of the browser used to render it? A) Incorporate languages and technologies such as Java, ActiveX, Microsoft Silverlight and Adobe Flash in your Web pages. B) Follow W3C standards carefully, choose one standard version of any given language you use, and apply that standard consistently. C) Write code in multiple versions of any given language to maximize the number of browsers in which your pages will render correctly. D) Avoid using HTML5 APIs in your Web pages. - correct answer -Follow W3C standards carefully, choose one standard version of any given language you use, and apply that standard consistently.
Which HTML 4.01 flavor required the separation of presentation and content? A) HTML 4.01 Standard B) HTML 4.01 Strict C) HTML 4.01 Frameset
D) HTML 4.01 Transitional - correct answer -HTML 4.01 Strict
To what does the term "app" refer? A) Relatively small programs that enable components of an application to work together to produce a desired functionality B) Relatively small applications developed exclusively for mobile devices C) Relatively simple Web pages that respond to user screen size D) Relatively simple Web pages that work in multiple environments - correct answer -Relatively small applications developed exclusively for mobile devices
The HTML5 specification supports, among others, the popular MP3, Ogg and WAV audio formats. Which of the following major Web browsers supports all three of these formats? A) Firefox and Internet Explorer 10 B) Chrome and Firefox C) Internet Explorer 10 and Chrome D) Safari and Firefox - correct answer -Chrome and Firefox
What distinguishes Extensible HTML (XHTML) from other versions of HTML? A) XHTML incorporates the strict syntax rules of Extensible Markup Language (XML) with the existing set of HTML 4.01 tags to create Web documents. B) XHTML standardizes how video and audio are presented on a Web page. C) XHTML establishes ways to enable drag-and-drop capability for Web pages without using third-party add-ons. D) XHTML gives developers more native tools to use on a page, such as download progress indicators, image captioning options and form validation. - correct answer -XHTML incorporates the strict syntax rules of Extensible Markup Language (XML) with the existing set of HTML 4.01 tags to create Web documents.
Which of the following is no longer necessary when you use HTML5 to develop Web pages? A) Applying a single W3C standard consistently throughout your document B) Validating your markup code
C) The structure element D) The structure element - correct answer -The structure element
Canvas is an HTML5 API that provides a place on a Web page (a "canvas") where you can display graphics, animation, video and games dynamically without the need for a plug-in. Which of the following should you use to create objects on a canvas? A) Flash B) CanvasScript C) Cascading Style Sheets (CSS) D) JavaScript - correct answer -JavaScript
Why is it important that you adopt a single W3C standard and apply it consistently to your Web page markup? A) When you validate your markup code, the code will match the DTD (standard syntax rules) that you specify. B) You can more easily structure your Web page without the need of document structure tags. C) When you validate your markup code, only invalid code will be marked as such. D) When you validate your markup code, the validation program can easily identify the actual cause of any invalid code. - correct answer -When you validate your markup code, the code will match the DTD (standard syntax rules) that you specify.
With respect to style sheets, inheritance is the ability for styles that you apply to an element to: A) be passed down throughout the rest of the document(s). B) override the style attribute in the element. C) be uploaded to the linked style sheet. D) override the style attributes in the element. - correct answer -be passed down throughout the rest of the document(s).
What can be considered a disadvantage of using Cascading Style Sheets 3 (CSS3) to apply styles to your Web pages? A) CSS3 cannot be used in conjunction with scripting languages when developing Web pages.
B) No styles guides exist for CSS3. C) CSS3 no longer allows styles to be inherited throughout your Web document. D) Most non-HTML5-compliant browsers cannot interpret CSS3. - correct answer -Most non-HTML5- compliant browsers cannot interpret CSS3.
Consider the following HTML and style sheet code:
A) A rule B) A value C) A declaration D) A property - correct answer -A rule
Why would you use an id selector with your CSS styles? A) To apply a specific CSS style to a group of like elements B) To apply a specific CSS style to one unique element C) To define the relationship between an HTML document and the external CSS file to which it is linked D) To specify an external CSS file's MIME type - correct answer -To apply a specific CSS style to one unique element
What happens when you place a CSS rule between the /* and */ characters? A) The rule will take precedence. B) The rule will apply only to the default page in a Web site. C) The rule will be ignored. D) The rule will override all other styles in the HTML document. - correct answer -The rule will be ignored.
What is a CSS selector? A) The property in a markup tag to which designated styles are applied B) The value in a markup tag you want to change with a CSS style C) Any element to which designated styles are applied D) A format instruction in a CSS file - correct answer -Any element to which designated styles are applied
If your company standard is to use Windows XP and IE8, what can you do to create a company intranet using HTML5 and CSS elements? A) You must define structural elements using HTML 4.01, and add a new rule to CSS to define the HTML 4.01 structural elements as block-level elements.
B) You must add JavaScript code to your HTML documents to create HTML5 structural elements, and add a new rule to CSS to define the HTML5 structural elements as block-level elements. C) You must define structural elements using XML, and add a new rule to CSS to define the XML structural elements as block-level elements. D) You must define structural elements using XHTML, and add a new rule to CSS to define the XHTML structural elements as block-level elements. - correct answer -You must add JavaScript code to your HTML documents to create HTML5 structural elements, and add a new rule to CSS to define the HTML structural elements as block-level elements.
What is the default value for aligning images relative to text using CSS? A) Middle B) Left C) Top D) Bottom - correct answer -Bottom
For which element of the CSS Box Model can you specify the width, style and color attributes? A) Margin B) Padding C) Content D) Border - correct answer -Border
Which of the following should you use to define a common format for your Web site and standardize the appearance of the site? A) A rule style B) A selector C) A declaration D) A style guide - correct answer -A style guide
How do you embed CSS in a single Web page as an internal style sheet? A) Add the
B) Because the liquid layout using CSS is the page-layout method native to all mobile apps C) Because the liquid layout enables you to assign specific pixel widths to elements using the HTML structural elements or the tag D) Because the size of each element is flexible and will change dynamically depending on the size of the browser window - correct answer -Because the size of each element is flexible and will change dynamically depending on the size of the browser window
Remy Sharp has created a script that has become the de facto standard for many Web developers around the world. The script enables Web developers to: A) use CSS1 and CSS2 with HTML5. B) support HTML5 in Chrome browsers. C) support HTML5 in Firefox browsers. D) support HTML5 in older IE browsers. - correct answer -support HTML5 in older IE browsers.
If you want a particular block-level element to always appear at the upper-right corner of the browser window, no matter how far down a user scrolls on the page, which type of CSS positioning should you apply? A) Relative B) Absolute C) Fixed D) Static - correct answer -Fixed
Why would you use a class selector with your CSS styles? A) To specify an external CSS file's MIME type B) To define the relationship between an HTML document and the external CSS file to which it is linked C) To apply a specific CSS style to multiple elements D) To apply a specific CSS style to one unique element - correct answer -To apply a specific CSS style to multiple elements
Which of the following can be considered a benefit of Cascading Style Sheets (CSS)? A) You can use CSS in lieu of HTML to develop Web pages.
B) Making changes to elements in the site will update the style sheet. C) The formatting instructions in the style sheet are not inherited throughout the document, providing flexibility. D) One simple change to the style sheet will change all associated elements across the site. - correct answer -One simple change to the style sheet will change all associated elements across the site.
What is the purpose of using a style guide when designing your Web site? A) To ensure that the same style sheet is applied to all pages in a Web site B) To apply the same formatting to multiple elements in a site without the need to style individual elements C) To ensure uniformity in style and formatting within a document and across multiple documents D) To provide pre-formatted page templates into which you can add content - correct answer -To ensure uniformity in style and formatting within a document and across multiple documents
In a CSS document, within what must you enclose properties and values when you define a rule for a specified selector? A) Quotation marks ( " " ) B) Asterisks ( * * ) C) Apostrophes ( ' ' ) D) Curly braces ( { } ) - correct answer -Curly braces ( { } )
Which term describes a set of standards for the writing and/or design of documents, either for general use or for a specific publication, organization or field? A) Style sheet B) Style standard C) Style guide D) Style recommendation - correct answer -Style guide
You want to apply an inline style to a single element that will override the style applied to that element by the external style sheet to which the HTML document is attached. How do you apply an inline style? A) Add the
The background-position property is a CSS1 property that defines the position of a background image, such as left-top or center-bottom. Which CSS3 background property can be used to define the location to which the background-position property should be relative? A) The background-clip property B) The background-origin property C) The background-image property D) The background-size property - correct answer -The background-origin property
What CSS3 property should you use if you want to apply a shadow effect behind characters in a Web document? A) The text-emphasis property B) The box-shadow property C) The text-shadow property D) The text-overflow property - correct answer -The text-shadow property
Which CSS3 border property should you use if you want to create a border that uses an image instead of just a line? A) The box-shadow property B) The box-image property C) The border-image property D) The border-radius property - correct answer -The border-image property
Before CSS3, background image size was largely dependent on the size of the original image. What CSS property can you use to resize a background image? A) The background-origin property B) The background-clip property C) The background-size property D) The background-crop property - correct answer -The background-size property
For what would you use the element:last-of-type selector? A) To select every instance of a specified element that is the last of its parent B) To select every disabled instance of a specified element C) To select every enabled instance of a specified element D) To select every instance of a specified element that is the first of its parent - correct answer -To select every instance of a specified element that is the last of its parent
Which CSS3 selector selects every instance of a specified element whose specified attribute contains the specified substring value? A) element[attribute^=value] B) element[attribute&=value] C) element[attribute=value] D) element[attribute$=value] - correct answer -element[attribute=value]
Which CSS3 border property should you use if you want to add a configurable shadow to a box? A) The box-image property B) The box-shadow property C) The border-image property D) The text-shadow property - correct answer -The box-shadow property
The CSS3 box-shadow property has the following values, which can be listed in one declaration:
h-shadow — the horizontal shadow position, also referred as x-offset v-shadow — the vertical shadow position, also referred as y-offset blur — the distance of the shadow's blur spread — the shadow size color — the shadow color inset — creates an inward shadow instead of an outward shadow
What CSS3 property can you use to specify transparency for an element? A) The opacity property B) The transparency property C) The background-image property D) The background-transparency property - correct answer -The opacity property
Which CSS3 selector selects every instance of a specified element that is the first of its parent? A) element:enabled B) element:last-of-type C) element:disabled D) element:first-of-type - correct answer -element:first-of-type
What occurs when you specify a background-size property value of cover? A) The background image is repeated as many times as necessary to completely overlay the background area of the parent container. B) The background image is scaled to the largest size possible that completely overlays the background area of the parent container while maintaining aspect ratio of the image. C) The background image is scaled to the largest size possible that allows both width and height to fit within the specified content area. D) The background image's width and height values are converted to em units. - correct answer -The background image is scaled to the largest size possible that completely overlays the background area of the parent container while maintaining aspect ratio of the image.
Which statement is true about the element1~element2 selector? A) It selects each occurrence of element2 that is preceded by element1. B) It selects each occurrence of element1 that is preceded by element2. C) Element2 must immediately precede element1. D) Element1 and element2 cannot have the same parent. - correct answer -It selects each occurrence of element2 that is preceded by element1.
Consider the following code:
div { -webkit-border-image: url(flowers.png) 80 40 round; }
What function does the -webkit- prefix perform? A) The -webkit- prefix ensures that the CSS3 code that it precedes will render properly in Opera browsers. B) The -webkit- prefix ensures that the CSS3 code that it precedes will render properly in Firefox browsers. C) The -webkit- prefix ensures that the CSS3 code that it precedes will render properly in Internet Explorer browsers. D) The -webkit- prefix ensures that the CSS3 code that it precedes will render properly in Chrome, Safari and iOS browsers. - correct answer -The -webkit- prefix ensures that the CSS3 code that it precedes will render properly in Chrome, Safari and iOS browsers.
CSS3 provides several new text effect properties designed to expand the formatting capabilities of Web page text. Which statement about the text effect properties is true? A) All browsers and browser versions recognize CSS3 text effect properties. B) CSS3 text effect properties can be used to produce effects that previously required the use of images. C) You must attach a text effect property as an inline style to the particular element to which it applies. D) Text effect properties can only be used with attribute selectors. - correct answer -CSS3 text effect properties can be used to produce effects that previously required the use of images.
In the past, Web designers were forced to format their pages using only fonts that were installed (or likely to be installed) on users' computers. With CSS3, you can now specify any font you want, even custom fonts, using: A) the @charset rule. B) the font-style property. C) the font-import property. D) the @font-face rule. - correct answer -the @font-face rule.