テスト資料Web-Development-Applicationsテストエンジン試験問題はここにある[2025年02月]
合格突破受験者シミュレーションされたWeb-Development-Applications試験PDF問題を試そう
質問 # 38
Given the following CSS code:
Which type of selector is used?
- A. Element
- B. ID
- C. Class
- D. Group
正解:B
解説:
The given CSS code uses the #name selector, which is an ID selector. The ID selector is used to style an element with a specific id attribute.
* ID Selector: In CSS, the ID selector is used to style the element with the specific id. The syntax for the ID selector is #id, where id is the id attribute value of the HTML element.
* Usage Example:
#name {
text-align: left;
}
This CSS rule will apply the text-align: left; style to the element with id="name".
* ID Selector Characteristics:
* An ID must be unique within a document, meaning it can be used only once per page.
* ID selectors are more specific than class selectors and element selectors.
* Example in HTML:
<div id="name">This is a div with ID "name".</div>
References:
* MDN Web Docs on CSS Selectors
* W3C CSS Specification on Selectors
質問 # 39
Given the following code:
Var a = ''true'';
What is the data type of d?
- A. Undefined
- B. Boolean
- C. Object
- D. String
正解:D
解説:
The data type of the variable a is determined by the value assigned to it. In JavaScript, if a value is enclosed in double or single quotes, it is treated as a string.
* Variable Assignment:
* Given the code:
var a = "true";
* The value "true" is enclosed in double quotes, making it a string.
* Explanation:
* Option A: Boolean is incorrect because the value "true" is a string, not a boolean.
* Option B: String is correct because the value is enclosed in double quotes.
* Option C: Object is incorrect because the value is a primitive string.
* Option D: Undefined is incorrect because the variable a is assigned a value.
* References:
* MDN Web Docs - JavaScript Data Types
* W3Schools - JavaScript Data Types
質問 # 40
Given the following code:
What is the value of the variable data when the code runs?
- A. Null
- B. An empty string
- C. A single-character string
- D. Undefined
正解:B
解説:
In JavaScript, assigning an empty pair of quotes to a variable creates an empty string.
* Variable Assignment:
* Given the code:
var data = "";
* The variable data is assigned an empty string.
* Explanation:
* Option A: Null is incorrect because the variable is assigned an empty string, not null.
* Option B: A single-character string is incorrect because the string is empty.
* Option C: Undefined is incorrect because the variable is assigned a value, even though it is an empty string.
* Option D: An empty string is correct because "" represents an empty string.
* References:
* MDN Web Docs - String
* W3Schools - JavaScript Strings
質問 # 41
Which HTML segment should a developer use to enable the Offline AppCache application interface (API)?
- A.

- B.

- C.

- D.

正解:C
解説:
The correct HTML segment to enable the Offline AppCache application interface (API) is by specifying the manifest attribute in the <html> tag.
* AppCache Manifest: The manifest attribute in the <html> tag is used to specify the URL of the AppCach
質問 # 42
Given the following HTML statement:
And the following style:
Which line of the changes the background color of the <div> tag when the width is between 600 pixels and
900 pixels or more than 1, 100 pixels?
- A.

- B.

- C.

- D.

正解:B
解説:
The given HTML and CSS statements define a class named "example" and use media queries to change the background color of the <div> element based on the screen width. The correct CSS media query to change the background color of the <div> tag when the width is between 600 pixels and 900 pixels or more than 1100 pixels is:Copy code
@media screen and (max-width: 900px) and (min-width: 600px), (min-width: 1100px) { div.example { background: yellow;
}
}
* Understanding Media Queries:
* @media screen: Applies the styles only for screens.
* (max-width: 900px) and (min-width: 600px): Targets screen widths between 600 and 900 pixels.
* , (comma): Acts as an "or" operator in media queries.
* (min-width: 1100px): Targets screen widths greater than or equal to 1100 pixels.
* Option C Explanation:
* This option uses the correct media query syntax to apply the background color change when the screen width is between 600 and 900 pixels or when it is 1100 pixels or more.
References:
* MDN Web Docs on Media Queries
* W3C CSS Media Queries Level 4
The correct CSS media query based on the provided options is:
@media screen and (max-width: 900px) and (min-width: 600px), (min-width: 1100px) { div.example { background: yellow;
}
}
References for Media Queries:
* MDN Web Docs on Using Media Queries
* W3C CSS Media Queries Module Level 4
質問 # 43
What should be used to request and Update data in the background?
- A. DOM
- B. Canvas
- C. AJAX
- D. API
正解:C
解説:
AJAX (Asynchronous JavaScript and XML) is used to request and update data in the background without reloading the web page.
* AJAX Overview:
* Purpose: Allows web pages to be updated asynchronously by exchanging data with a web server behind the scenes.
* Benefits: Provides a smoother user experience by avoiding full page reloads.
* Example:
* Using XMLHttpRequest:
var xhr = new XMLHttpRequest();
xhr.open("GET", "data.json", true);
xhr.onreadystatechange = function() {
if (xhr.readyState === 4 && xhr.status === 200) {
var data = JSON.parse(xhr.responseText);
console.log(data);
}
};
xhr.send();
* References:
* MDN Web Docs - AJAX
* W3Schools - AJAX Introduction
質問 # 44
Given the following CSS code:
How many seconds elapse before the font-size property begins to increase when a user hovers a mouse pointer over the delay element?
- A. 0
- B. 1
- C. 2
- D. 3
正解:C
解説:
The CSS transition-delay property specifies how long to wait before starting a property transition. In the given CSS code, the transition-delay is set to 2s.
* CSS Transition Properties:
* transition-property: Specifies the CSS property to which the transition is applied (font-size in this case).
* transition-duration: Specifies how long the transition takes (4s).
* transition-delay: Specifies the delay before the transition starts (2s).
Example:
* Given HTML:
<div id="delay">Hover over me</div>
* Given CSS:
#delay {
font-size: 14px;
transition-property: font-size;
transition-duration: 4s;
transition-delay: 2s;
}
#delay:hover {
font-size: 36px;
}
Explanation: When a user hovers over the element with id="delay", it will wait for 2 seconds before the transition effect on font-size starts.
References:
* MDN Web Docs - transition-delay
* W3C CSS Transitions
質問 # 45
Given the following CSS code:
Which portion is the rule?
- A.

- B.

- C.

- D.

正解:B
解説:
In CSS, a rule is composed of a selector and a declaration block. The rule is the entire part that defines how styles should be applied to elements matching the selector.
* CSS Rule Components:
* Selector: Identifies the HTML elements to be styled (e.g., body, .name, #item).
* Declaration Block: Contains one or more declarations, each consisting of a property and a value, enclosed in curly braces {}.
* Example Analysis:
* Option A:
body {
background-color: white;
}
This is the full rule, consisting of the selector body and the declaration block { background-color: white; }.
* Option B:
background-color: white;
This is just a declaration, not a complete rule.
background-color: white,
This is an incorrect declaration due to the comma, and not a complete rule.
* Option D:
color: black
This is just a declaration, not a complete rule.
* References:
* W3C CSS Syntax and Basic Data Types Module Level 3
* MDN Web Docs - CSS Syntax
質問 # 46
A web designer inserts an image into a web page.
Which CSS attribute should this designer use to ensure that there is one of pixel of space between the line image and the surrounding elements?
- A. border
- B. Padding
- C. Margin
- D. Content
正解:C
解説:
To ensure that there is one pixel of space between the image and the surrounding elements, the margin property should be used.
* CSS Margin Property: The margin property is used to create space around elements, outside of any defined borders.
* Usage Example:
img {
margin: 1px;
}
In this example, the margin: 1px; rule sets a margin of 1 pixel around the image, creating the desired space.
References:
* MDN Web Docs on Margin
* W3C CSS Specification on Margin
質問 # 47
Given the following CSS statement:
Which code segment changes the font color when the viewport is 800 pixels wide or wider?
- A.

- B.

- C.

- D.

正解:A
解説:
To change the font color when the viewport is 800 pixels wide or wider, a media query with min-width:
800px is used. This ensures that the styles inside the media query are applied only when the viewport width is at least 800 pixels.
* CSS Media Queries:
* Syntax for Media Query:
@media screen and (min-width: 800px) {
body {
color: black;
}
}
* Explanation: The min-width: 800px condition ensures that the styles are applied when the viewport is 800 pixels or wider.
* Example Analysis:
* Option A:
@media screen and (min-width: 800px) {
body {
color: black;
}
}
* Correct. This applies the color: black; style to the body when the viewport is 800 pixels or wider.
* Option B:
@media min-width: 800px {
body {
color: black;
}
}
* Incorrect. Missing screen and which is required for a proper media query targeting screens.
* Option C:
@media screen and (max-width: 800px) {
body {
color: black;
}
}
* Incorrect. This applies the style when the viewport is 800 pixels or narrower.
* Option D:
@media max-width: 800px {
body {
color: black;
}
}
* Incorrect. This applies the style when the viewport is 800 pixels or narrower.
* References:
* MDN Web Docs - Using media queries
* W3Schools - CSS Media Queries
The correct use of media queries ensures that the specified styles are applied only under the desired conditions, providing a responsive design.
質問 # 48
Given the following markup:
Where does the image align in relation to the text?
- A. The lop of the image aligns the bottom of Hello world.
- B. The top of The image aligns to the top of Hello World
- C. The bottom of the Image aligns to the bottom of Hello World
- D. The bottom of the image aligns to the top of Held world.
正解:C
解説:
The CSS property vertical-align: baseline aligns the baseline of the element with the baseline of its parent. For inline elements like images, the baseline alignment means that the bottom of the image aligns with the bottom of the text.
* CSS vertical-align Property:
* Baseline Alignment: Aligns the baseline of the element with the baseline of its parent.
* Example:
<p>Hello World<img src="sample.jpg" style="vertical-align:baseline"></p>
* Analysis:
* The <img> element with vertical-align: baseline will align its bottom with the bottom of the surrounding text "Hello World".
* References:
* MDN Web Docs - vertical-align
* W3C CSS Inline Layout Module Level 3
質問 # 49
Given the following code:
What is occurring?
- A. JavaScript is using the DOM to make a style change.
- B. An event handler is tracking keyboard strokes.
- C. In-line CSS is styling the <h1> tag.
正解:A
解説:
The given code snippet demonstrates how JavaScript can manipulate the DOM to change the style of an element.
* Code Analysis:
* Given the HTML:
<h1 id="id1">Blog Title</h1>
<button type="button" onclick="document.getElementById('id1').style.color = 'red'">Click Here</button>
* When the button is clicked, the JavaScript code within the onclick attribute changes the color of the h1 element to red.
* Explanation:
* Option A: An event handler tracking keyboard strokes is incorrect because the event handler is tracking a mouse click, not keyboard strokes.
* Option B: JavaScript is using the DOM to make a style change is correct because the onclick attribute contains JavaScript code that modifies the style of the h1 element.
* Option C: In-line CSS is styling the <h1> tag is incorrect because the style change is done via JavaScript, not inline CSS.
* References:
* MDN Web Docs - Document.getElementById()
* W3Schools - JavaScript HTML DOM
質問 # 50
A web page has a section that contains an <article> element. The element is always 10 pixels to the right of its position.
Which type of layout positioning should the <article> element use?
- A. Relative
- B. Fixed
- C. Static
- D. Absolute
正解:A
解説:
Relative positioning in CSS positions an element relative to its normal position. Using position: relative; allows you to adjust the element's position with the top, right, bottom, or left properties.
* CSS Relative Positioning:
* Syntax:
article {
position: relative;
left: 10px;
}
* Description: Moves the element 10 pixels to the right from its normal position.
* Example:
* Given HTML:
<article>Content</article>
* Given CSS:
article {
position: relative;
left: 10px;
}
* Explanation: The <article> element will be positioned 10 pixels to the right of where it would normally appear.
* References:
* MDN Web Docs - position
* W3C CSS Positioned Layout Module Level 3
質問 # 51
Where can users items using the HTML
- A. From a user's computer to another computer
- B. From a user's computer to a web page
- C. From a web page to another web page
- D. From a web page to a user's computer
正解:B
解説:
Using HTML, users can upload files from their computer to a web page using the <input> element with the type="file" attribute.
* File Upload Input: The <input type="file"> element is used in forms to allow users to select files from their local file system to be uploaded to a server.
* Usage Example:
The <canvas> element in HTML5 is used to render images and graphics dynamically through JavaScript. It is a powerful feature for creating graphics, game visuals, data visualizations, and other graphical content directly in the browser.
* Canvas Element: The <canvas> element is an HTML tag that, with the help of JavaScript, can be used to draw and manipulate graphics on the fly.
* Usage Example:
html
Copy code
<canvas id="myCanvas" width="200" height="100"></canvas>
<script>
var canvas = document.getElementById("myCanvas");
var ctx = canvas.getContext("2d");
ctx.fillStyle = "#FF0000";
ctx.fillRect(0, 0, 200, 100);
</script>
In this example, a red rectangle is drawn on a canvas element.
References:
* MDN Web Docs on <canvas>
* W3C HTML Canvas 2D Context Specification
<form action="/upload" method="post" enctype="multipart/form-data">
<input type="file" name="fileToUpload" id="fileToUpload">
<input type="submit" value="Upload File" name="submit">
</form>
In this example, users can choose a file from their computer and upload it to the specified server endpoint.
References:
* MDN Web Docs on <input type="file">
* W3C HTML Specification on File Upload
質問 # 52
Given the following markup and no style sheet:
Which control does the input element render?
- A. Drop-down
- B. Button
- C. Text
- D. Slider
正解:D
解説:
The type="range" attribute in an <input> element renders a slider control.
* HTML Input Type range:
* Purpose: The range type is used for input fields that should contain a value from a range of numbers.
* Example:
* Given the HTML:
<input id="range" name="range" type="range">
* Explanation:
* This will render as a slider that the user can move to select a value within a range.
* References:
* MDN Web Docs - <input type="range">
* W3Schools - HTML Input Range
質問 # 53
Which framework assists designers with adaptive page layout?
- A. Bootstrap
- B. React
- C. Knockout
- D. Modernize
正解:A
解説:
Bootstrap is a popular front-end framework that assists designers in creating adaptive and responsive page layouts easily.
* Bootstrap:
* Responsive Design: Bootstrap provides a responsive grid system, pre-styled components, and utilities that help in designing adaptive layouts.
* Example:
<div class="container">
<div class="row">
<div class="col-sm-4">Column 1</div>
<div class="col-sm-4">Column 2</div>
<div class="col-sm-4">Column 3</div>
</div>
</div>
* Other Options:
* A. Modernize: Not a framework, but a JavaScript library to detect HTML5 and CSS3 features.
* C. React: A JavaScript library for building user interfaces, not specifically for layout.
* D. Knockout: A JavaScript library for implementing MVVM pattern, not specifically for layout.
* References:
* Bootstrap Documentation
* MDN Web Docs - Responsive design
These answers ensure accurate and comprehensive explanations for the given questions, supporting efficient learning and understanding.
質問 # 54
Which History API object is called when a browser window's document history changes?
- A. Window, name
- B. Window, open
- C. Window, location
- D. Window, onpopstate
正解:D
解説:
The onpopstate event is triggered in the window object when the active history entry changes, such as when the user navigates to a different page using the back or forward buttons in the browser.
* History API and onpopstate:
* Event: window.onpopstate
* Description: This event is fired when the user navigates to a session history entry, i.e., when moving backwards or forwards in the browser history.
* Example:
window.onpopstate = function(event) {
console.log("location: " + document.location + ", state: " + JSON.stringify(event.state));
};
* Other Options:
* A. Window, location: location is an object containing information about the current URL.
* C. Window, name: name is a property to set or get the name of a window.
* D. Window, open: open is a method to open a new browser window or tab.
* References:
* MDN Web Docs - window.onpopstate
* W3Schools - JavaScript History API
質問 # 55
Given the following javaScript code:
Which code segment calls the method?
- A. Window,sayhello();
- B. Obj,sayHello;
正解:B
解説:
To call the sayHello method in the given JavaScript object, you need to use the object's name followed by the method name with parentheses.
* Correct Method Call:
* Given the object definition:
var obj = {
sayHello: function() {
alert("Hello");
}
};
* To call the method sayHello on the object obj:
obj.sayHello();
* Explanation:
* Option A: Obj.sayHello; is incorrect syntax. The correct syntax is obj.sayHello();.
* Option B: Window.sayHello(); is incorrect because the method is defined in the obj object, not the window object.
* References:
* MDN Web Docs - Functions
* W3Schools - JavaScript Objects
質問 # 56
A web developer need to ensure that a message appears if the user's browser does not support the audio files on a web page.
How should this designer code the audio element?
- A.

- B.

- C.

- D.

正解:B
解説:
To ensure that a message appears if the user's browser does not support the audio files on a web page, the developer should use the <audio> element correctly. The <audio> element supports fallback content, which is displayed if the browser does not support the specified audio formats.
* Correct Usage:
* Fallback Content: Place the message as fallback content inside the <audio> element. Browsers that do not support the audio format will display this message.
* Example:
<audio>
<source src="audio/song.mp3" type="audio/mpeg" />
No mpeg support.
</audio>
* Explanation of Options:
* Option A: Incorrect. The alt attribute is not valid for the <source> element.
* Option B: Incorrect. The alt attribute is not valid for the <audio> element.
* Option C: Incorrect. The alt attribute is used incorrectly in the <audio> element.
* Option D: Correct. The message "No mpeg support." is placed correctly as fallback content inside the <audio> element.
* References:
* W3C HTML5 Specification - The audio element
* MDN Web Docs - <audio>
Using the fallback content inside the <audio> element ensures that users with unsupported browsers receive a meaningful message, improving the overall user experience.
質問 # 57
Which tag is required when importing the jQuery library?
- A. Section
- B. Body
- C. Script
- D. meta
正解:C
解説:
The <script> tag is required when importing the jQuery library into an HTML document.
* Including jQuery:
* Purpose: The <script> tag is used to embed or reference executable code (JavaScript).
* Example:
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
* Explanation:
* The <script> tag should be placed in the <head> or at the end of the <body> to ensure that the library is loaded before the scripts that depend on it.
* References:
* jQuery Getting Started
* MDN Web Docs - <script>
質問 # 58
What is a common technique to ensure users can access all content on a mobile web page?
- A. Navigation links requiring scrolling
- B. Targeted site content
- C. A link to the full site
- D. Access to multiple link layers
正解:C
解説:
Providing a link to the full site on a mobile web page is a common technique to ensure users can access all content if they find the mobile version limiting.
* Advantages:
* Access to Full Functionality: Users can switch to the desktop version if they need features not available on the mobile site.
* User Control: It gives users the choice to view the site in a layout they are more comfortable with.
* Other Options:
* A. Access to multiple link layers: This does not directly address user needs for full site access.
* B. Targeted site content: While important, it does not replace the need for a full site link.
* D. Navigation links requiring scrolling: This can worsen the user experience on mobile devices.
* References:
* Google Developers - Mobile Site Design
質問 # 59
Which attribute displays help text in an input field without specifying an actual value for the input?
- A. Default
- B. For
- C. name
- D. Placeholder
正解:D
解説:
The placeholder attribute in an <input> element displays help text in the input field without specifying an actual value for the input. This text disappears when the user starts typing.
* Placeholder Attribute: This attribute provides a hint to the user about what type of information is expected in the field.
* Usage Example:
<input type="text" placeholder="Enter your name">
The input field will show "Enter your name" as help text.
References:
* MDN Web Docs on placeholder
* W3C HTML Specification on Input Placeholder
質問 # 60
......
正真正銘で最適なWeb-Development-Applicationsオンライン練習試験資料:https://www.jpntest.com/shiken/Web-Development-Applications-mondaishu
優良な質を持つWeb-Development-Applications問題集と解釈が待ってます。 今すぐゲット:https://drive.google.com/open?id=1vdE_dzQ85FXCCWTE1pvQwfRAXp3Xat6K