INF-306 Exam Preparation Material | HTML5 Application Development

Prepare for the INF-306 with reliable study materials, practice questions, and key exam insights.

Prepare for the INF-306 HTML5 Application Development exam with CertQueen's independently developed study resources. Review important concepts, practice scenario-based questions, and use clear explanations to identify areas that require further study.

Question#1

Which two background graphics will automatically adjust to different screen sizes? Note: You will receive partial credit for each correct selection. Choose 2.

A. < body style= " background: url(media/background.jpg); background-size: contain; background-repeat: no-repeat; " >
B. < body style= " background: url(media/background.jpg); background-size: initial; background-repeat: no-repeat; " >
C. < body style= " background: url(media/background.jpg); background-size: cover; background-repeat: no-repeat; " >
D. < body style= " background: url(media/background.jpg); background-size: auto; background-repeat: no-repeat; " >

Explanation:
The correct answers are A and C because background-size: contain and background-size: cover are the CSS values that scale a background image in response to the size of the element or viewport. contain scales the background image as large as possible while preserving the entire image inside the background area. This prevents cropping and maintains the image’s aspect ratio, although empty space may appear if the container and image proportions differ. cover also preserves the aspect ratio, but scales the image until the entire background area is filled; this may crop part of the image, but it prevents empty space. Both values are commonly used in responsive design because the image automatically recalculates its rendered size as the page or element changes dimensions. initial resets the property to its default behavior and does not intentionally create responsive scaling. auto uses the image’s intrinsic dimensions or proportional automatic sizing, so it does not reliably adjust the graphic to different screen sizes in the way required.
References /topics: responsive design, CSS background images, background-size, contain, cover, viewport-based scaling.

Question#2

You need to define a grid that meets the following requirements:
• Explicitly sets the width of 6 equal columns of 1 fraction
• Explicitly sets 5 varied sized rows
• Defines 15px of space between each grid column
• Defines 10px between each grid row
Complete the code by selecting the correct option from each drop-down list.


A. 

Explanation:
display: grid;
grid-template-columns: repeat(6, 1fr);
grid-template-rows: 50px 50px 150px 150px 100px;
grid-gap: 10px 15px;
The correct grid definition starts with display: grid; which turns the element into a CSS Grid container. To explicitly create six equal-width columns, the correct property is grid-template-columns, and the most efficient value is repeat(6, 1fr). The repeat() function avoids writing 1fr six separate times, while 1fr assigns each column one equal fraction of the available grid width. The five row sizes must be explicitly declared with grid-template-rows, using the exact varied values shown: 50px 50px 150px 150px 100px. This creates five rows with fixed pixel heights. For the spacing requirement, grid-gap: 10px 15px; is the correct shorthand. The first value controls the row gap, so rows are separated by 10px; the second value controls the column gap, so columns are separated by 15px.
References/topics: CSS Grid containers, explicit grid tracks, grid-template-columns, grid-template-rows, repeat(), fractional units, grid gaps.

Question#3

You define the following layout:
<! DOCTYPE html >
< html >
< head >
< style >
section {
display: flex;
align-items: center;
flex-wrap: wrap;
min-height: 200px;
width: 700px;
background: linen;
}
section p {
flex: 1;
min-width: 200px;
padding: 20px;
}
< /style >
< /head >
< body >
< h2 > Exhibits to visit at the zoo < /h2 >
< section >
< p style= " order: 3 " > Lions < /p >
< p style= " order: 4 " > Tigers < /p >
< p style= " order: 2 " > Bears < /p >
< p style= " order: 1 " > Zoo Trip < /p >
< /section >
< /body >
< /html >
For each statement about the markup shown on the left, select True or False.


A. 

Explanation:
The paragraph containing the text Tigers will display first.
False
The section p CSS refers to the parent flexbox container.
False
When the paragraphs have a width less than 200px, the last paragraph will wrap to the next line.
True
The parent flexbox container is the section element because it has display: flex; The paragraphs inside the section become flex items. The display order is controlled by each paragraph’s inline order value, and flex items are laid out from the lowest order value to the highest. Therefore, Zoo Trip with order: 1 displays first, followed by Bears, Lions, and finally Tigers; the statement that Tigers displays first is false. The selector section p does not refer to the parent flexbox container. It targets paragraph elements inside a section, meaning it styles the flex items, not the flex container. The container itself is targeted by the section rule. The final statement is true in intent because flex-wrap: wrap; allows flex items to move to a new line when they cannot fit in the available row. Since each paragraph has min-width: 200px, items are prevented from shrinking below that minimum and wrapping occurs when available space is insufficient.
References/topics: CSS flexbox, flex container, flex items, order, flex-wrap, min-width.

Question#4

You want to display a message box showing the user ' s current latitude and longitude as identified by the user’ s browser.
Complete the code by selecting the correct option from each drop-down list. Note: You will receive partial credit for each correct selection.


A. 

Explanation:
First drop-down: navigator.geolocation
Second drop-down: navigator.geolocation
Third drop-down: getCurrentPosition(showLocation)
The correct API object is navigator.geolocation because browser-based geographic location is exposed through the Geolocation API, not through window.location. window.location represents the current page URL and navigation state; it does not provide latitude or longitude. The first selection checks whether the browser supports geolocation by evaluating navigator.geolocation. Inside the block, the same object must be used to request the user’s current position. The correct method is getCurrentPosition(showLocation), which requests the device’s current location and passes a position object to the callback function when the location is available. The callback then reads position.coords.latitude and position.coords.longitude and displays those values with alert(). The alternatives that pass window.location are incorrect because they provide page-location information rather than geographic coordinates. The alternatives that call showLocation(...) directly are also incorrect because the browser must first retrieve the actual position object.
References/topics: Geolocation API, navigator.geolocation, getCurrentPosition(), callback functions, latitude and longitude.

Question#5

What is the effect of applying the CSS float: right property to an image?

A. It positions the image to the right of the region and wraps text around the top, left, and bottom.
B. It positions the image to the right and wraps text to the top and bottom.
C. It positions the image to the left and displays all of the text to the right of the image.
D. It positions the image to the left of the region and wraps text around the top, right, and bottom.

Explanation:
The correct answer is A. Applying float: right to an image removes the image from the normal inline flow and moves it to the right side of its containing block. Inline content, such as text, is then allowed to flow around the floated image. Because the image is anchored on the right, available text space is primarily on the left side of the image, and the text can continue above, beside, and below the floated region according to the surrounding layout. This is the classic use case for floating images within article-style content, where text wraps around a visual element rather than forcing the image to occupy an entire line.
Option B is incomplete because it omits the important left-side wrapping behavior.
Option C describes the opposite direction: an image floated left with text appearing to its right.
Option D also describes float: left, not float: right.
References/topics: CSS float, floated images, text wrapping, normal flow, content positioning.

Exam Code: INF-306
Q & A: 68 Q&As         Updated:  Sep 27,2026

 

 Access Complete INF-306 Preparation Material

What This INF-306 Study Resource Helps You Do

Review Key Concepts

Review the technologies, products, processes, and practical skills covered by the current INF-306 exam objectives.

Practice Scenario-Based Questions

Work through independently developed questions designed to strengthen your understanding of technical scenarios and decision-making.

Identify Knowledge Gaps

Use your results and the provided explanations to find weaker areas and focus your study more effectively.

How to Use This INF-306 Preparation Material

Review the Exam Scope

Start by reviewing the topics covered by the INF-306 exam. Compare them with the official exam objectives to understand the required technologies, operational tasks, and practical skills, then identify the areas that deserve the most attention.

Practice Independently

Complete a focused set of practice questions for each topic. On your first attempt, avoid referring to notes, answers, or other study resources so that you can evaluate your current understanding more accurately.

Study the Explanations

Review the answers and explanations after completing each practice session. Understand why the correct option is appropriate for the given scenario and why the other options may be incorrect or less suitable.

Close Knowledge Gaps

Keep track of incorrect answers, unfamiliar concepts, and weaker knowledge areas. Review these topics using official documentation and practical experience, then answer the related questions again to reinforce your understanding and monitor your progress.

Independent INF-306 Preparation Resource

CertQueen independently develops its certification study materials for educational purposes. The practice questions are not copied from, recalled from, or presented as live or official exam questions.

CertQueen is not affiliated with, endorsed by, sponsored by, or authorized by any certification provider. Certification names, exam codes, product names, and related trademarks are the property of their respective owners and are referenced only for identification and educational purposes.

Exam Code: INF-306
Q & A: 68 Q&As
Updated:  Sep 27,2026

 

 Access Complete INF-306 Preparation Material