Computer Science Exit Exam Study Guide · 305 questions
Read the question first. Select the eye beside the reading hint, study the cited module section, then reveal the answer. Each eye controls only its own block. All hints and answers start closed whenever this page opens.
Read the linked study-guide sections before revealing the answer. PDF page references count from the first page of the document.
305 of 305 questions
Question 1
Which symbol is used to write a single line comment in JavaScript?
A. <?
B. <!---------------->
C. //
D. &&
Hint / Module Reference (Where to Read)
Check exact language syntax, declaration rules and execution context before reasoning about the result.
Correct answer: A — SIZE controls approximate visible text-input width.
WEB09 distinguishes size from maxlength: size describes the approximate visible width of a text input, while maxlength limits how much text can be entered. That matches the stem’s focus on characters displayed without scrolling. VALUE provides initial content and TYPE selects the control kind; neither is the width-setting attribute requested here.
Evidence in the complete study note
For a text input, size indicates approximate visible width, whereas maxlength limits entered text length.WEB09
For a text input, the value attribute supplies its initial text value; it does not specify the control’s width.WEB-S02
Choice by choice
A · correct — SIZE controls approximate visible width for a text input, matching the display-without-scrolling description.
B · incorrect — MAXLENGTH limits entered text length rather than determining how wide the input appears.
C · incorrect — VALUE supplies the control’s content, not its visible character-width setting.
D · incorrect — TYPE selects the input-control kind rather than its approximate visible width.
Question 3
Which method can be used to divide a browser into smaller sub windows so that each sub window displaying a different HTML document?
A. Using paragraphs
B. Using frames
C. Using images
D. Using tables
Hint / Module Reference (Where to Read)
Use the element or attribute meaning and document structure, rather than appearance or a similar-looking name.
Frames display independent windows/subwindows and each frame may contain a different web page (p.20). This matches dividing the browser into document views. Evidence: PDF p. 20, PDF p. 20, PDF p. 17.
Evidence in the complete study note
Legacy frameset/frame divides a window into separate documents; frameset replaced body in old frameset documents.WEB10
<p> marks paragraphs; <br> is a line break and <hr> a thematic break.WEB06
<table> contains rows <tr>, header cells <th> and data cells <td>; a td is not the table itself.WEB08
Choice by choice
A · incorrect — Paragraphs structure text (p.15), not separate document views.
B · correct — Frames explicitly provide the required subwindows.
C · incorrect — Images embed visual content, not independent HTML documents.
D · incorrect — Tables structure rows and columns, not separate document views.
Question 4
Which statement is false about potential benefits of well-designed external style sheets? Treat benefits as possibilities, not guarantees.
A. Style sheets can support accessible presentation
B. Style sheets can create a consistent appearance
C. Style sheets can make HTML pages easier to maintain
D. Style sheets cannot reduce repeated markup or transferred file size
Hint / Module Reference (Where to Read)
Identify which elements a rule targets and distinguish selector syntax from declaration syntax.
Correct answer: D — Style sheets cannot reduce repeated markup or transferred file size
External CSS lets several pages reuse presentation rules, making visual changes easier to maintain and helping consistency. Reuse and caching can reduce repeated markup and transfers, although savings depend on the implementation. Accessible presentation is also possible, but CSS alone does not establish accessibility. The false statement is the absolute denial of any size or transfer savings; the other choices describe potential benefits rather than universal promises.
Evidence in the complete study note
External CSS promotes reuse, consistent design and caching; it does not guarantee that every page becomes smaller or accessible.WEB11
Give controls programmatic labels, clear link text and keyboard access; visual styling alone does not establish accessibility.WEB07
Choice by choice
A · incorrect — Accessible presentation can be supported, though semantic markup and usable controls are still needed.
B · incorrect — Reused rules can give pages a consistent appearance.
C · incorrect — Central rules reduce repeated presentation edits across pages.
D · correct — This absolute denial is false: reuse and caching can reduce repeated markup and transfers.
Question 5
What will be the out of the following JavaScript statement? Math.abs(-9)
A. 9
B. -9
C. 1
D. 0
Hint / Module Reference (Where to Read)
Track the value and type at each operation, applying the stated conversion, indexing or mathematical rule.
WEB18 explicitly evaluates Math.abs(-9) as 9. Absolute value removes the negative sign from a negative numeric argument and leaves its magnitude, so the result is neither the original negative number nor a Boolean-like one or zero. This is an expression result; no rounding or text conversion is involved.
Evidence in the complete study note
For finite numeric arguments, Math.abs(x) gives the nonnegative magnitude, Math.floor(x) gives the greatest integer no larger than x, and Math.sqrt(x) gives the nonnegative square root for nonnegative x.WEB-S08
Choice by choice
A · correct — The absolute value of negative nine is its nonnegative magnitude, nine.
B · incorrect — Negative nine is the input; absolute value does not preserve its negative sign.
C · incorrect — Math.abs returns numeric magnitude rather than a Boolean-like value of one.
D · incorrect — The input is nonzero, so its absolute value is not zero.
Question 6
In the legacy browser expression document.bgColor, what is bgColor?
A. bgColor is a method
B. bgColor is the document object
C. bgColor is a property
D. bgColor is an event handler
Hint / Module Reference (Where to Read)
Distinguish the browser object or dialog role from the kind of response it collects.
The expression uses the lowercase document object name and the exact camelCase member bgColor. In this legacy API, bgColor is a property representing background color, rather than a method call or event handler. Asking specifically about the member avoids confusing it with window.document, which is itself a property. Current code normally changes the background through document.body.style.backgroundColor rather than this legacy interface.
Evidence in the complete study note
document.bgColor is a legacy property; Document.bgcolor has wrong object/case.WEB22
In a normal browser page, window exposes the browsing context and document is its document property.WEB22
Choice by choice
A · incorrect — No function is invoked or named by this legacy color member.
B · incorrect — document is the object on which the member is accessed, not the bgColor value.
C · correct — The legacy member stores a background-color setting.
D · incorrect — The member is a color property, not an event callback.
Question 7
Look at the following valid PHP array:
$list = array("outside" => "red", "inside" => "brown", "top" => "black", "under" => "blue");
Which exact string key indexes the value "black"?
A. brown
B. outside
C. under
D. top
Hint / Module Reference (Where to Read)
Identify the role requested and compare it with the definitions and constraints in the cited passages.
PHP associative arrays map explicit keys to values. In each pair, the text before the contiguous => operator is the key and the text after it is the value. The pair containing black therefore uses the key top. String-key case matters, so the lowercase spelling is retained in the corrected choices. The other offered strings either identify another entry or are themselves a value rather than the requested key.
Evidence in the complete study note
PHP arrays map integer/string keys to values.WEB26
Associative syntax uses a contiguous => operator: ["top"=>"black"] stores black under key"top".WEB26
Choice by choice
A · incorrect — brown is the value associated with inside, not the key of black.
B · incorrect — outside identifies red.
C · incorrect — under identifies blue.
D · correct — top is the exact key paired with black.
Question 8
Which statement is false about modern JavaScript running in a browser sandbox?
A. The language cannot support sophisticated applications
B. Scripts can access selected client devices through permission-based APIs
C. Scripts have restricted access to arbitrary client files and hardware
D. Script source can be supplied as text and executed by the browser
Hint / Module Reference (Where to Read)
Check exact language syntax, declaration rules and execution context before reasoning about the result.
Correct answer: A — The language cannot support sophisticated applications
Browser JavaScript supports sophisticated applications; its sandbox is a restriction on access to resources, not proof of an inherently weak language. Selected file or device access can be exposed through permission-based APIs, while arbitrary hardware access remains restricted. JavaScript source can be included in pages or loaded from a script file. Thus the language-capability claim is false, while the qualified environment and source-delivery claims are compatible.
Evidence in the complete study note
Browser scripts are sandboxed, but may access selected files/devices through permission-based APIs.WEB01
They are not inherently limited to trivial programs, nor can they freely access arbitrary client hardware.WEB01
Use <script src="app.js"></script> for an external .js file; script content has no HTML closing-tag syntax inside its JavaScript source.WEB15
Choice by choice
A · correct — The note explicitly allows sophisticated applications, so this denial is false.
B · incorrect — Permission-based APIs allow selected device access.
C · incorrect — Sandbox restrictions limit arbitrary resource access.
D · incorrect — Script inclusion supplies source for browser execution.
Question 9
Which one of the following is false?
A. A web browser is a software that runs on a server
B. A user agent renders resources for a user to view
C. A website is a collection of resources in various forms
D. A web page is the basic unit of information storage on the www
Hint / Module Reference (Where to Read)
Identify the role requested and compare it with the definitions and constraints in the cited passages.
Correct answer: A — A web browser is a software that runs on a server
The module places web pages on servers and says web clients view them using a browser (p.9). Thus A reverses the browser role in the ordinary client/server description. Web pages hold web information (p.8); B and C describe the compatible rendering/resource roles, though they are not verbatim definitions. Evidence: PDF p. 9, PDF p. 8, PDF p. 9.
Evidence in the complete study note
A browser/user agent requests resources and renders HTML/CSS, then runs permitted JavaScript.WEB01
A web/HTTP server receives requests and returns representations, sometimes invoking application code.WEB01
A website groups resources; a page is one document/resource.WEB02
Choice by choice
A · correct — Client-side browser role contradicts this server-role claim in the teaching model.
B · incorrect — A browser views pages, consistent with rendering resources.
C · incorrect — Website files are hosted together (p.9), consistent with this collection description.
D · incorrect — Page 8 explicitly says web information is stored in Web pages.
Question 10
Which one of the following is the correct syntax for document type declaration in HTML5?
A. </doctype html>
B. <!doctype! Html>
C. <doctype! Html>
D. <!doctype html>
Hint / Module Reference (Where to Read)
Use the element or attribute meaning and document structure, rather than appearance or a similar-looking name.
The module examples begin <!DOCTYPE html> (p.21 and p.30). D has that declaration form, with lowercase keyword; the other choices change its punctuation. Evidence: PDF p. 21, PDF p. 30.
Evidence in the complete study note
<!DOCTYPE html> selects modern standards mode; <html> is the document root, <head> holds metadata, and <body> contains document content.WEB06
Choice by choice
A · incorrect — A closing-tag slash is not the demonstrated declaration.
B · incorrect — Extra exclamation after doctype is absent from the example.
C · incorrect — Missing exclamation immediately after <.
D · correct — Matches the module declaration structure.
Question 11
In HTML, how do we create a link to another site?
A. <a href="http://www.somedomain.com">click here</a>
B. <a url="http://www.somedomain.com">click here</a>
C. <a link="http://www.somedomain.com">click here</a>
D. <a "http://www.somedomain.com">click here</a>
Hint / Module Reference (Where to Read)
Use the element or attribute meaning and document structure, rather than appearance or a similar-looking name.
Correct answer: A — <a href="http://www.somedomain.com">click here</a>
Page 14 requires an anchor with an href containing the web address. A supplies that attribute and encloses link text between a and /a. Evidence: PDF p. 14.
Evidence in the complete study note
Use <a href="page.html">Read</a> for a link; href is the destination, not url/link.WEB07
Choice by choice
A · correct — Exactly the anchor/href pattern on p.14.
B · incorrect — url does not substitute for the stated href attribute.
C · incorrect — link does not substitute for href.
D · incorrect — A bare quoted URL omits the required href attribute.
Question 12
Which one of the following form attribute is used to assign the server-side script file that
processes the form data?
A. Action
B. Autocomplete
C. Method
D. Target
Hint / Module Reference (Where to Read)
Separate the control role, displayed content, submitted value and form destination.
The form attribute action points to the backend script processing collected data. Method instead specifies upload method; target controls the result window.
Evidence in the complete study note
A form’s action identifies its processing URL, method its submission method, and enctype its encoding.WEB09
A form’s target identifies the window or frame in which the submitted result is displayed.WEB-S02
Choice by choice
A · correct — Backend processing script is precisely action.
B · incorrect — Autocomplete is not assigned the processing-script role.
C · incorrect — Method determines the submission method, not script filename.
D · incorrect — Target determines window/frame for the result.
Question 13
What does this JavaScript print in an ordinary browser page?
<script>
let x = 4 + "4";
document.write(x);
</script>
A. 44
B. 8
C. 4
D. The code contains an error
Hint / Module Reference (Where to Read)
Track the value and type at each operation, applying the stated conversion, indexing or mathematical rule.
The addition expression is complete and ends with a semicolon. Because one operand is a string, + performs concatenation here: the numeric operand contributes its text and the result is the string 44. document.write then emits those two digits.
Evidence in the complete study note
+ can concatenate when a string is involved; arithmetic / converts ordinary numeric strings.WEB16
document.write is a method/function property; writing after document load can replace the document.WEB22
Choice by choice
A · correct — The string operand makes the two digit representations concatenate.
B · incorrect — Numeric addition would require numeric operands rather than the given string.
C · incorrect — The right operand contributes another digit to the output.
D · incorrect — The expression is syntactically valid.
Question 14
What does the following valid PHP code output?
<?php
$color = "maroon";
$var = $color[2];
echo "$var";
?>
A. a
B. Error
C. var
D. r
Hint / Module Reference (Where to Read)
Trace the bindings and operations in order; preserve the exact string characters and distinguish returned values from emitted output.
PHP string offsets start at zero. The characters of maroon at offsets zero, one and two are m, a and r, so the selected character is r. The variable is interpolated by the double-quoted echo string and no extra spacing is added.
Evidence in the complete study note
String offsets start at zero: "maroon"[2] is r when the surrounding PHP is valid.WEB24
Double-quoted strings interpolate variables and escapes such as \n; single quotes normally preserve dollar names literally.WEB24
Use <?php ...WEB23
Choice by choice
A · incorrect — a is at offset one.
B · incorrect — The PHP delimiter and string access are valid.
C · incorrect — Interpolation emits the value of $var, not its name.
D · correct — r occupies offset two of maroon.
Question 15
In PHP, which function initiates a session?
A. start()
B. s_start()
C. session_start()
D. session_str()
Hint / Module Reference (Where to Read)
Follow the identifier and server-side state through the stated lifecycle or access check; distinguish client-controlled claims from server decisions.
The names $_GET, $_POST and $_SERVER are all PHP superglobals, representing query values, supported form POST data and request/environment details respectively. The question asks for the complete selection in one option, so All of the above is the best response. Each individual array is genuinely a superglobal, but selecting just one would omit the other two valid entries.
Evidence in the complete study note
$_GET contains query parameters; $_POST contains supported form POST data; $_FILES upload metadata; $_SERVER request/environment details; $_COOKIE cookie values; $_SESSION session data after startup.WEB27
Choice by choice
A · incorrect — True individually, but incomplete because POST and SERVER are also superglobals.
B · incorrect — True individually, but incomplete because GET and SERVER are also superglobals.
C · incorrect — True individually, but incomplete because GET and POST are also superglobals.
D · correct — This aggregate includes all three valid superglobals.
Question 17
Which of the following is the correct syntax to link an external style sheet in the HTML file?
A. <link rel="stylesheet" src="style.css" />
B. <link rel="stylesheet" href="style.css" />
C. <style rel="stylesheet" src="style.css" />
D. <style rel="stylesheet" link="style.css" />
Hint / Module Reference (Where to Read)
Identify which elements a rule targets and distinguish selector syntax from declaration syntax.
Correct answer: B — <link rel="stylesheet" href="style.css" />
The external CSS example uses <link rel="stylesheet" href="style.css"> (p.29). B matches the element, relationship and URL attribute. Evidence: PDF p. 29, PDF p. 28.
Evidence in the complete study note
An external sheet uses <link rel="stylesheet" href="styles.css"> in head; an internal sheet uses style; an inline declaration uses an element’s style attribute.WEB11
Choice by choice
A · incorrect — src is not the demonstrated stylesheet URL attribute.
B · correct — Matches the complete link/rel/href pattern.
C · incorrect — style is used for embedded rules, and src is wrong here.
D · incorrect — style with link does not implement the module external-link syntax.
Question 18
Which of the following is used for concatenation in PHP?
A. *(Asterisk)
B. . (dot)
C. append()
D. + (plus)
Hint / Module Reference (Where to Read)
Identify the role requested and compare it with the definitions and constraints in the cited passages.
Correct answer: C — CSS controls presentation rather than generating server-side pages.
WEB01 assigns CSS presentation and identifies PHP, JSP/Java, and ASP.NET applications as generating server responses. In this role distinction, CSS is the exclusion: it styles a representation rather than executing the server page-generation logic. CSS can affect displayed appearance, but that does not make it a server-side dynamic-page generator like the other offered technologies.
Evidence in the complete study note
HTML supplies structure/meaning; CSS controls presentation; JavaScript supplies programmable interactivity.WEB01
PHP, Python, JSP/Java and ASP.NET applications generate server responses and access databases; C# is commonly used with ASP.NET.WEB01
Choice by choice
A · incorrect — JSP/Java applications are identified in WEB01 as server-side response generators.
B · incorrect — PHP applications can generate server responses and access databases, fitting dynamic-page generation.
C · correct — CSS supplies presentation rules rather than the server logic that generates dynamic page representations.
D · incorrect — ASP.NET applications are identified as server-side response generators, so they are not the exclusion.
Question 20
In PHP MySQLi, after mysqli_init() and mysqli_ssl_set(...) have configured the required TLS and certificate-verification settings, which function initiates the database connection?
A. mysqli_real_connect(...)
B. pdo_connect_ssl()
C. mysql_ssl_connect()
D. secure_connect()
Hint / Module Reference (Where to Read)
Identify the API and operation first, then distinguish connection setup, statement execution and result processing.
MySQLi separates initialization and TLS configuration from opening the connection. Under the stated setup, mysqli_real_connect performs the connection step using the configured handle and required options. The other names are not standard connection functions in the supplied note. Choosing the actual API does not mean that any call automatically verifies certificates; that protection depends on the verification configuration explicitly included in the question.
Evidence in the complete study note
Configure MySQLi TLS options through mysqli_init(), mysqli_ssl_set(...) and mysqli_real_connect(...) with the required verification configuration.WEB31
mysqli_ssl_connect(), pdo_connect_ssl(), mysql_ssl_connect() and secure_connect() are not substitutes for the MySQLi TLS configuration sequence above.WEB31
Choice by choice
A · correct — This is the connection step in the documented MySQLi TLS sequence.
B · incorrect — This is not the documented PDO or MySQLi connection API.
C · incorrect — The note rejects this invented SSL connection function.
D · incorrect — The note rejects this generic invented function name.
Question 21
Which JavaScript function is used to display a dialog box with an alert message?
A. console.log()
B. confirm()
C. alert()
D. prompt()
Hint / Module Reference (Where to Read)
Distinguish the browser object or dialog role from the kind of response it collects.
Alert shows a browser popup containing its argument (p.47). Prompt requests input, confirm returns a Boolean choice, and console.log writes to the console (p.46). Evidence: PDF p. 47, PDF p. 46.
Evidence in the complete study note
alert displays information, confirm returns a Boolean, and prompt requests text or returns null on cancellation.WEB22
console.log logs diagnostics.WEB22
Alert is a notification; confirm additionally asks for an OK/Cancel decision, while prompt additionally offers a text field.WEB-S03
Choice by choice
A · incorrect — Console output is not an alert dialog.
B · incorrect — Confirmation presents OK/Cancel and returns a Boolean.
C · correct — Exactly the documented alert popup.
D · incorrect — Prompt additionally requests text input.
Question 22
Which JavaScript method is used to select an HTML element by its ID?
A. getElementById()
B. getElementByTag()
C. getElementByName()
D. getElementByClass()
Hint / Module Reference (Where to Read)
Track which node is selected or created, and distinguish changing content from attaching a node.
The DOM methods list says getElementById(id) returns the element with that specific ID (p.52). Evidence: PDF p. 52.
Evidence in the complete study note
document.getElementById("x") returns the matching element or null; querySelector(".item") returns the first match, and querySelectorAll returns a static NodeList.WEB20
Choice by choice
A · correct — Exact ID lookup method.
B · incorrect — Not the documented getElementsByTagName; also tag selection differs.
C · incorrect — No getElementByName is defined here; not ID lookup.
D · incorrect — Not the documented class lookup and not ID lookup.
Question 23
Which language is used to add interactivity and dynamic behavior to a web page?
A. HTML
B. PHP
C. CSS
D. JavaScript
Hint / Module Reference (Where to Read)
Identify the role requested and compare it with the definitions and constraints in the cited passages.
The module divides roles: HTML structure, CSS presentation, JavaScript functionality and interactive content updates (p.44). Evidence: PDF p. 44, PDF p. 60.
Evidence in the complete study note
HTML supplies structure/meaning; CSS controls presentation; JavaScript supplies programmable interactivity.WEB01
PHP, Python, JSP/Java and ASP.NET applications generate server responses and access databases; C# is commonly used with ASP.NET.WEB01
Choice by choice
A · incorrect — HTML supplies structure.
B · incorrect — PHP generates server output, whereas this stem targets page interactivity.
C · incorrect — CSS supplies presentation.
D · correct — JavaScript supplies interactive browser behavior.
Question 24
Which of the following languages is primarily responsible for defining the structure and
content of a web page?
A. HTML
B. JavaScript
C. PHP
D. CSS
Hint / Module Reference (Where to Read)
Identify the role requested and compare it with the definitions and constraints in the cited passages.
WEB30 directly distinguishes file_exists, which tests files or directories, from is_file, which narrows the test to regular files. The question explicitly includes either a file or directory, so file_exists matches. The other two named checks are not the provided APIs, while is_file is too restrictive for the requested test.
Evidence in the complete study note
file_exists tests files or directories; is_file narrows to regular files.WEB30
Choice by choice
A · correct — file_exists() checks existence for files or directories, exactly the two entry kinds in the stem.
B · incorrect — file_exists_check() is not the filesystem existence API identified by the complete note.
C · incorrect — is_file() tests regular files and would not report an existing directory as a regular file.
D · incorrect — file_check() is not the filesystem existence API given in WEB30.
Question 26
Using the procedural MySQLi API with connection $conn, which function reports rows changed, inserted or deleted by the last successful data-changing statement?
A. mysqli_num_rows($result)
B. $stmt->rowCount()
C. get_affected_rows($conn)
D. mysqli_affected_rows($conn)
Hint / Module Reference (Where to Read)
Identify the API and operation first, then distinguish connection setup, statement execution and result processing.
The procedural MySQLi affected-row function takes a connection and reports the effect of a successful data-changing statement under the connection’s options. Counting rows in a SELECT result is a different operation, and a PDO statement method belongs to a different API. The question specifies both the API and the kind of row count, making the procedural call uniquely appropriate without assuming all PHP database interfaces share identical function names.
Evidence in the complete study note
mysqli_num_rows counts a result’s rows; mysqli_affected_rows($conn) counts changed/inserted/deleted rows under its options; mysqli_insert_id($conn) reports a generated AUTO_INCREMENT value from the connection.WEB32
PDOStatement::rowCount() is a method on a PDO statement object that reports affected rows for its DELETE, INSERT or UPDATE statement.WEB-S04
Choice by choice
A · incorrect — This counts rows in a result set, not the last data-changing statement’s effect.
B · incorrect — This is a PDO statement method rather than the requested procedural MySQLi call.
C · incorrect — This is not the documented procedural function.
D · correct — This is the documented affected-row function for the connection.
Question 27
Which PHP superglobal array is used to retrieve information about the server and execution
environment?
A. $_POST
B. $_SESSION
C. $_GET
D. $_SERVER
Hint / Module Reference (Where to Read)
Identify the data source or security responsibility precisely, and check whether a combined source or a different control could also qualify.
$_SERVER is the predefined array for server-created headers, paths and script locations (p.62). Evidence: PDF p. 62, PDF p. 76.
Evidence in the complete study note
$_GET contains query parameters; $_POST contains supported form POST data; $_FILES upload metadata; $_SERVER request/environment details; $_COOKIE cookie values; $_SESSION session data after startup.WEB27
Choice by choice
A · incorrect — POST contains form/request variables.
B · incorrect — SESSION stores per-user application state (p.76).
C · incorrect — GET contains GET request variables.
D · correct — Matches server/execution information.
Question 28
Which PHP superglobal is the dedicated source for supported form fields submitted using HTTP POST, rather than a configurable combination of request sources?
A. $_REQUEST
B. $_GET
C. $_POST
D. $_SERVER
Hint / Module Reference (Where to Read)
Identify the data source or security responsibility precisely, and check whether a combined source or a different control could also qualify.
$_POST is the dedicated array for supported form POST data. $_REQUEST may also contain POST values, but combines sources according to configuration and is therefore not the dedicated source requested. $_GET contains query parameters, while $_SERVER contains request and environment details. The distinction is the origin-specific array, not whether a value could appear in more than one superglobal.
Evidence in the complete study note
$_GET contains query parameters; $_POST contains supported form POST data; $_FILES upload metadata; $_SERVER request/environment details; $_COOKIE cookie values; $_SESSION session data after startup.WEB27
$_REQUEST may combine GET/POST/cookie data according to configuration; it is not a database interface and has ambiguous precedence, so prefer the intended source.WEB27
Choice by choice
A · incorrect — $_REQUEST can include POST values, but combines configured request sources rather than identifying only POST form data.
B · incorrect — $_GET contains URL query parameters rather than the dedicated POST form map.
C · correct — $_POST is specifically the supported form POST-data source.
D · incorrect — $_SERVER holds request/environment information, not the submitted POST field map.
Question 29
Which names describe a server that receives webpage requests through HTTP/HTTPS and returns representations? Select all that apply.
A. Http Server
B. Web Server
C. FTP server
D. DNS Server
Hint / Module Reference (Where to Read)
Identify the role requested and compare it with the definitions and constraints in the cited passages.
Correct answers (select all): A, B — Http Server; Web Server
A web server is also called an HTTP server in this context. It receives requests and returns resource representations, possibly invoking application code to construct them. The two labels describe the same serving role and must both be selected. FTP serves a distinct transfer purpose, while DNS supplies name-to-record resolution. The question now explicitly permits the synonymous correct names instead of forcing an arbitrary choice between them.
Evidence in the complete study note
A web/HTTP server receives requests and returns representations, sometimes invoking application code.WEB01
Hosting supplies an environment where a site is served; domain registration reserves a name, and DNS maps names to network records.WEB02
HTTP defines web application requests, response status codes and representations.WEB-S14
An HTTP exchange can use underlying TCP connections and IP addresses; naming that network stack does not identify the application-level method or status semantics.WEB-S14
FTP is a file-transfer application protocol.WEB-S14
SMTP transports electronic mail.WEB-S14
Choice by choice
A · correct — HTTP server names the request-and-response role described.
B · correct — Web server is the equivalent name in this context.
C · incorrect — FTP is not the stated HTTP webpage-serving role.
D · incorrect — DNS resolves names rather than returning webpage representations through HTTP.
Question 30
The attribute used in the body tag to change the default font color for the page is
________.
A. Bgcolor attribute
B. text attribute
C. color attribute
D. link tag
Hint / Module Reference (Where to Read)
Identify the requested presentation effect and layout context before matching the property or rule.
The body attribute list explicitly gives text="text color" separately from bgcolor and link (p.12). Evidence: PDF p. 12.
Evidence in the complete study note
In historical markup, the body text attribute controlled default text color, while bgcolor controlled background.WEB13
Choice by choice
A · incorrect — bgcolor sets background color.
B · correct — text is explicitly paired with text color.
C · incorrect — color is not the listed body default-text attribute.
D · incorrect — link is paired with link color, not all text.
Question 31
For a basic static website with no client scripts that change its displayed content, which single option gives the complete set of true statements about its stored-page delivery model?
A. Changing the stored page representation requires changing the stored file
B. The server returns stored files rather than constructing a response from application logic
C. The page representation is delivered as stored
D. Viewers requesting the same unchanged file receive the same stored representation
E. All of the above.
Hint / Module Reference (Where to Read)
Identify the role requested and compare it with the definitions and constraints in the cited passages.
A basic static server returns stored files rather than dynamically constructing representations from application logic. The question restricts content to the stored representation and excludes scripts that could change the rendered view. Under those assumptions, A through D describe compatible aspects of the same model. All of the above is the complete single selection; each individual statement is true but would cover only part of the requested set.
Evidence in the complete study note
A basic static server returns stored files; dynamic processing constructs a representation from logic, requests or data.WEB02
Static pages can still run interactive browser scripts, and dynamic generation need not change visible text every time.WEB02
Choice by choice
A · incorrect — True but incomplete: it states only how the stored representation changes.
B · incorrect — True but incomplete: it states the serving model alone.
C · incorrect — True but incomplete: it omits the other delivery properties.
D · incorrect — True but incomplete: it states sameness for the same unchanged resource only.
E · correct — This aggregate contains every true statement under the specified model.
Question 32
Which single option gives the complete selection of technologies that can generate server-side web responses?
A. PHP
B. ASP.NET
C. Python
D. All of the above
Hint / Module Reference (Where to Read)
Identify the role requested and compare it with the definitions and constraints in the cited passages.
PHP, Python and ASP.NET applications can generate server responses and access databases. The question deliberately asks about technologies rather than calling every entry a programming language, since ASP.NET is an application technology. All three listed entries satisfy that broader but precise role, so the aggregate is the complete single answer. Selecting an individual entry would state a true example while omitting the other two supported server-side technologies.
Evidence in the complete study note
PHP, Python, JSP/Java and ASP.NET applications generate server responses and access databases; C# is commonly used with ASP.NET.WEB01
Choice by choice
A · incorrect — PHP fits, but this single entry omits the other valid technologies.
B · incorrect — ASP.NET applications fit, but the selection is incomplete.
C · incorrect — Python applications fit, but the selection is incomplete.
D · correct — All three entries support server response generation.
Question 33
Which option gives the complete set of listed JavaScript dialogs that can display a supplied message, whether or not they also collect a response?
A. Prompt
B. Alert
C. Confirm
D. All of the above
Hint / Module Reference (Where to Read)
Distinguish the browser object or dialog role from the kind of response it collects.
Alert, confirm and prompt all present a supplied message. Alert provides a notification, confirm additionally requests an OK/Cancel decision, and prompt additionally offers a text field. The question asks for the complete set of qualifying dialogs, so All of the above is the complete selection. Each individual dialog is a true example but omits the other two qualifying dialogs.
Evidence in the complete study note
alert(message), confirm(message) and prompt(message) all present a supplied message.WEB-S03
alert displays information, confirm returns a Boolean, and prompt requests text or returns null on cancellation.WEB22
Choice by choice
A · incorrect — Prompt displays a message while requesting text, so it qualifies; selecting it alone omits alert and confirm and is incomplete.
B · incorrect — Alert displays a notification, so it qualifies; selecting it alone omits prompt and confirm and is incomplete.
C · incorrect — Confirm displays a message while requesting an OK/Cancel decision, so it qualifies; selecting it alone omits prompt and alert and is incomplete.
D · correct — All three listed dialogs can display a supplied message, so this is the complete qualifying set.
Question 34
What does these code possibly refers to<link rel="stylesheet" href="styles.css"> ?
A. Defines a new CSS by the name styles
B. Calls an internal style sheet called styles
C. Calls an external style sheet called styles
D. Defines an inline CSS by the name styles
Hint / Module Reference (Where to Read)
Identify which elements a rule targets and distinguish selector syntax from declaration syntax.
Correct answer: C — Calls an external style sheet called styles
The link tag identifies a separate stylesheet URL (p.29); p.28 explains that this links an external stylesheet shared by pages. Evidence: PDF p. 29, PDF p. 28.
Evidence in the complete study note
An external sheet uses <link rel="stylesheet" href="styles.css"> in head; an internal sheet uses style; an inline declaration uses an element’s style attribute.WEB11
Choice by choice
A · incorrect — It references an existing file, not a CSS definition.
B · incorrect — Internal CSS instead uses a style block.
C · correct — It links the external styles.css file.
D · incorrect — Inline CSS instead uses an element style attribute.
Question 35
Which valid HTML snippet uses CSS to set the body background color to yellow?
A. <body background="yellow">
B. <background>yellow</background>
C. <body style="background-color: yellow">
D. <background color="yellow">text<background>
Hint / Module Reference (Where to Read)
Identify which elements a rule targets and distinguish selector syntax from declaration syntax.
Correct answer: C — <body style="background-color: yellow">
The CSS property background-color controls an element’s background. An inline declaration belongs in the opening element’s style attribute, so the body tag applies the requested color. The other snippets either use a background attribute instead of the specified CSS property or invent markup that does not express this body style.
Evidence in the complete study note
color sets text color; background-color sets background; font-size size, font-family face, font-style italic, font-weight weight, text-align inline-content alignment, and text-decoration effects such as underline.WEB13
An external sheet uses <link rel="stylesheet" href="styles.css"> in head; an internal sheet uses style; an inline declaration uses an element’s style attribute.WEB11
Choice by choice
A · incorrect — This uses an attribute rather than the requested background-color declaration.
B · incorrect — This invents a background element instead of styling body.
C · correct — The valid body start tag contains the appropriate CSS declaration.
D · incorrect — This markup does not supply a valid body style declaration.
Question 36
What is the method used to get the result from the form data sent with both GET
and POST?
A. $_REQUEST
B. $_POST
C. $_GET
D. A & B
Hint / Module Reference (Where to Read)
Identify the data source or security responsibility precisely, and check whether a combined source or a different control could also qualify.
Correct answer: A — $_REQUEST can combine GET and POST input according to configuration.
WEB27 states that $_GET contains query parameters and $_POST supported form POST data, while $_REQUEST may combine GET, POST, and cookie data according to configuration. Therefore $_REQUEST is the offered combined-source mechanism. It is an array rather than a method, and its configuration-dependent precedence is a reason to prefer an explicit source in real code.
Evidence in the complete study note
$_GET contains query parameters; $_POST contains supported form POST data; $_FILES upload metadata; $_SERVER request/environment details; $_COOKIE cookie values; $_SESSION session data after startup.WEB27
$_REQUEST may combine GET/POST/cookie data according to configuration; it is not a database interface and has ambiguous precedence, so prefer the intended source.WEB27
Choice by choice
A · correct — $_REQUEST can combine GET and POST values according to PHP configuration, matching the combined-source question.
B · incorrect — $_POST holds supported form POST data and does not generally combine query GET values.
C · incorrect — $_GET holds URL query parameters rather than combining both query and form POST sources.
D · incorrect — Adding $_POST to the already combined $_REQUEST is redundant and is not the single combined mechanism requested.
Question 37
When using mysqli_connect(), which argument selects the default database and may be deferred until after connecting?
A. Host
B. Database
C. Username
D. Password
Hint / Module Reference (Where to Read)
Identify the API and operation first, then distinguish connection setup, statement execution and result processing.
The mysqli_connect signature separates host, user, password and database, followed by port and socket. Selecting a database can be deferred even though several arguments also have defaults. The revised question asks which argument performs that particular selection, rather than incorrectly implying only one argument is optional. The database argument names the initial database; the remaining listed arguments identify the server or provide authentication credentials.
Evidence in the complete study note
mysqli_connect(host,user,password,database,port,socket) opens a connection; selecting a database can be deferred, and defaults make several arguments technically optional.WEB31
Choice by choice
A · incorrect — The host identifies the server, not the default database.
B · correct — This selects the initial database and can be deferred.
C · incorrect — The username supplies an authentication identity.
D · incorrect — The password supplies a credential, not the database selection.
Question 38
Consider the CSS reset:
nav ul {
list-style-type: none;
margin: 0;
padding: 0;
}
What does this rule itself accomplish for a navigation list?
A. Aligns the navigation bar to the right
B. Adds hover effects to list items
C. Removes list bullets and default margin and padding
D. Converts the list into a dropdown menu
Hint / Module Reference (Where to Read)
Identify which elements a rule targets and distinguish selector syntax from declaration syntax.
Correct answer: C — Removes list bullets and default margin and padding
The rule selects unordered lists inside nav elements. list-style-type removes list markers, while margin and padding reset the relevant spacing to zero. Nothing in the rule chooses a horizontal or right-aligned layout, installs a hover state or implements dropdown behavior.
Evidence in the complete study note
Resetting nav ul with list-style-type:none; margin:0; padding:0 removes bullets and default spacing only; it does not itself arrange links horizontally or create a dropdown.WEB08
Type p selects paragraph elements, .notice selects a class, #logo an ID, h1,h2 groups selectors, nav ul selects descendants and nav>ul direct children.WEB11
Choice by choice
A · incorrect — No alignment property is supplied.
B · incorrect — No hover selector or interaction rule is supplied.
C · correct — These are exactly the marker and spacing effects of the three declarations.
D · incorrect — A dropdown needs additional layout and interaction rules.
Question 39
Which PHP superglobal is dedicated specifically to retrieving URL query parameters, rather than a configurable mixture of request sources?
A. $_REQUEST
B. $_POST
C. $_GET
D. isset()
Hint / Module Reference (Where to Read)
Identify the data source or security responsibility precisely, and check whether a combined source or a different control could also qualify.
URL query values belong to $_GET. $_REQUEST can also include query data under some configurations, but it combines sources and therefore is not the dedicated query array requested here. $_POST represents supported form POST data, and isset tests whether an entry exists and is non-null rather than retrieving the entry’s value. The question asks for the dedicated query array, making $_GET the unique selection.
Evidence in the complete study note
$_GET contains query parameters; $_POST contains supported form POST data; $_FILES upload metadata; $_SERVER request/environment details; $_COOKIE cookie values; $_SESSION session data after startup.WEB27
$_REQUEST may combine GET/POST/cookie data according to configuration; it is not a database interface and has ambiguous precedence, so prefer the intended source.WEB27
isset tests existence and non-null, not truth or valid syntax.WEB27
Choice by choice
A · incorrect — This can mix query, POST and cookie sources according to configuration.
B · incorrect — This represents form POST data rather than the dedicated URL query source.
C · correct — This is the dedicated query-parameter superglobal.
D · incorrect — This tests existence and non-null; it is not a request-data array.
Question 40
In CSS, which property is used to change the text color of an element?
A. text-color
B. font-color
C. color
D. Foreground
Hint / Module Reference (Where to Read)
Identify the requested presentation effect and layout context before matching the property or rule.
The color property sets foreground content color (p.34), and p.31 illustrates p { color: red; }. Evidence: PDF p. 34, PDF p. 31.
Evidence in the complete study note
color sets text color; background-color sets background; font-size size, font-family face, font-style italic, font-weight weight, text-align inline-content alignment, and text-decoration effects such as underline.WEB13
Choice by choice
A · incorrect — Not the documented CSS name.
B · incorrect — Not the documented CSS name.
C · correct — Exact property used for text/foreground color.
D · incorrect — A description of the effect, not the CSS property spelling.
Question 41
is a service that allows organizations and individuals to post a website or a
web page onto the Internet.
A. Web hosting
B. Internet service provider
C. .
Web client
D. Domain name registration
Hint / Module Reference (Where to Read)
Identify the role requested and compare it with the definitions and constraints in the cited passages.
The module defines web hosting as the service allowing organizations/individuals to post a website or web page onto the Internet (p.9). Evidence: PDF p. 9.
Evidence in the complete study note
Hosting supplies an environment where a site is served; domain registration reserves a name, and DNS maps names to network records.WEB02
An ISP provides connectivity.WEB02
A browser/user agent requests resources and renders HTML/CSS, then runs permitted JavaScript.WEB01
Choice by choice
A · correct — Exact definition.
B · incorrect — An ISP access service is not the hosting definition here.
C · incorrect — A web client reads pages rather than hosting them.
D · incorrect — Registration reserves a name, not the hosting service.
Question 42
Which protocol is mostly used for communication between client and server in a web
application?
A. FTP
B. SMTP
C. .
HTTP
D. SSH
Hint / Module Reference (Where to Read)
Identify the role requested and compare it with the definitions and constraints in the cited passages.
The WWW discussion explicitly says web computers use the HTTP communication standard (p.8). Evidence: PDF p. 8.
Evidence in the complete study note
The Internet connects networks; the Web is a resource system commonly using HTTP.WEB01
HTTP defines web application requests, response status codes and representations.WEB-S14
An HTTP exchange can use underlying TCP connections and IP addresses; naming that network stack does not identify the application-level method or status semantics.WEB-S14
FTP is a file-transfer application protocol.WEB-S14
SMTP transports electronic mail.WEB-S14
Choice by choice
A · incorrect — Not the module web communication standard.
B · incorrect — Not the module web communication standard.
C · correct — HTTP is expressly named.
D · incorrect — Not the module web communication standard.
Question 43
What is the extension of JavaScript file?
A. javaS
B. JS
C. ¢.
java
D. CSS
Hint / Module Reference (Where to Read)
Identify which elements a rule targets and distinguish selector syntax from declaration syntax.
The external script example uses script.js, establishing the .js extension (p.45). B represents JS, ignoring case of the descriptive option. Evidence: PDF p. 45, PDF p. 44.
Evidence in the complete study note
Use <script src="app.js"></script> for an external .js file; script content has no HTML closing-tag syntax inside its JavaScript source.WEB15
JavaScript originated at Netscape; it is distinct from Java and supports sophisticated applications through prototype-based objects and first-class functions.WEB15
An external sheet uses <link rel="stylesheet" href="styles.css"> in head; an internal sheet uses style; an inline declaration uses an element’s style attribute.WEB11
Choice by choice
A · incorrect — javaS is not the demonstrated extension.
B · correct — JS corresponds to the demonstrated .js extension.
C · incorrect — java is not the demonstrated extension; Java is a different language.
D · incorrect — CSS is for stylesheets, not JavaScript.
Question 44
A developer stores $_SESSION["user_id"] server-side and an editable logged_in cookie client-side. A protected endpoint grants access solely when logged_in=1 and never validates the server-side session. An unauthenticated attacker sets that cookie. Which statement is most accurate?
A. The endpoint is vulnerable: trusting the cookie alone bypasses the required server-session authorization
B. The endpoint is secure because server-side session data exists
C. The endpoint is vulnerable only if the genuine session ID is exposed
D. The endpoint is secure if HTTPS is used
Hint / Module Reference (Where to Read)
Follow the identifier and server-side state through the stated lifecycle or access check; distinguish client-controlled claims from server decisions.
Correct answer: A — The endpoint is vulnerable: trusting the cookie alone bypasses the required server-session authorization
The protected endpoint trusts an attacker-controlled value rather than checking authenticated server-side state. Setting the flag is therefore sufficient to gain the access that should require session authorization. Merely storing a user ID elsewhere does not help when that state is never consulted. No genuine session identifier must be stolen for this bypass, and HTTPS protects transmission rather than proving that a client-generated authorization claim is true.
Evidence in the complete study note
A client cookie logged_in=1 is attacker-controlled.WEB29
If the server trusts it alone, authorization can be bypassed.WEB29
HTTPS does not make client-generated claims trustworthy.WEB29
Choice by choice
A · correct — The stated cookie-only authorization path allows the attacker to bypass the required session check.
B · incorrect — Unused server-side state does not protect this endpoint.
C · incorrect — No genuine session ID is needed when the endpoint trusts only the flag.
D · incorrect — Transport protection does not make a forged client flag trustworthy.
Question 45
Which one of the following is not feature of dynamic web page?
A. Contents can be generated on-the-fly
B. Changing content or lively
C. Contain the same prebuilt content each time the page is loaded
D. Ability to connect to a database
Hint / Module Reference (Where to Read)
Identify the role requested and compare it with the definitions and constraints in the cited passages.
Correct answer: C — Always serving the same prebuilt content is the static-generation description.
WEB02 contrasts a basic static server returning stored files with dynamic processing constructing a representation from logic, requests, or data. C describes the prebuilt static delivery model rather than the distinctive feature of dynamic generation. Dynamic pages may still happen to display identical text across loads; the exclusion concerns same prebuilt content as a model, not a requirement that every dynamic response visibly change.
Evidence in the complete study note
A basic static server returns stored files; dynamic processing constructs a representation from logic, requests or data.WEB02
Static pages can still run interactive browser scripts, and dynamic generation need not change visible text every time.WEB02
PHP, Python, JSP/Java and ASP.NET applications generate server responses and access databases; C# is commonly used with ASP.NET.WEB01
Choice by choice
A · incorrect — Generating content on demand is directly consistent with dynamic processing from logic, requests, or data.
B · incorrect — Dynamic content can change with inputs or application data, although visible changes are not mandatory on every load.
C · correct — Always returning the same prebuilt content describes the static delivery model rather than dynamic response generation.
D · incorrect — Server-side applications can access databases while constructing dynamic responses, as described in WEB01.
Question 46
Why should form <input> elements include an associated <label> with the for attribute?
A. It enables offline form storage
B. It encrypts user data
C. .
It increases form submission speed
D. It improves accessibility: screen readers announce the label when the input is focused
Hint / Module Reference (Where to Read)
Separate the control role, displayed content, submitted value and form destination.
Correct answer: D — An associated label gives the input an accessible name.
WEB09 connects a label’s for value to the control’s id. WEB07 requires programmatic labels for accessibility. Together these support an input label that assistive technology can announce when the control is focused. That association does not store the form offline, encrypt data, or increase submission speed; its purpose here is accessible identification of the control.
Evidence in the complete study note
A label’s for matches the control’s id; name identifies its submitted field.WEB09
Give controls programmatic labels, clear link text and keyboard access; visual styling alone does not establish accessibility.WEB07
Choice by choice
A · incorrect — Label association identifies a control and does not create offline form storage.
B · incorrect — A label does not encrypt values or change transport security; encryption needs a separate mechanism.
C · incorrect — Linking a label to an input does not increase network or form-submission speed.
D · correct — The associated label provides accessible control identification that screen readers can announce on focus.
Question 47
Which HTML tag is used for program listing?
A. <p>
B. <pre>
C. <head>
D. <sub>
Hint / Module Reference (Where to Read)
Use the element or attribute meaning and document structure, rather than appearance or a similar-looking name.
Correct answer: B — <pre> preserves program-listing whitespace.
WEB06 says <pre> preserves source whitespace, which is needed for displaying an indented program listing. <code> can additionally mark code semantics, but it is not offered here. A paragraph does not preserve the listing’s whitespace by itself, head is metadata, and sub marks a subscript. Therefore <pre> is the matching listed tag.
Evidence in the complete study note
<pre> preserves source whitespace; <code> marks code.WEB06
<!DOCTYPE html> selects modern standards mode; <html> is the document root, <head> holds metadata, and <body> contains document content.WEB06
<sub>/<sup> mark sub/superscripts.WEB06
Choice by choice
A · incorrect — A paragraph marks prose structure and does not by itself preserve a program listing’s indentation and line breaks.
B · correct — The preformatted element preserves source whitespace, making it suitable for an indented program listing.
C · incorrect — The head holds metadata rather than visible program-listing content.
D · incorrect — The sub element marks subscript text and does not provide preformatted listing whitespace.
Question 48
Which attribute of a text input limits the number of characters the user may enter, rather than its visible width?
A. MAXLENGTH
B. TYPE
C. ACTION
D. STYLE
Hint / Module Reference (Where to Read)
Identify which elements a rule targets and distinguish selector syntax from declaration syntax.
For a text input, maxlength limits entered text length, while size controls approximate visible width. The revised question removes the scrolling and new-line language because those are display concerns rather than the entered-character bound. TYPE chooses the control kind, ACTION identifies a form-processing destination and STYLE supplies presentation declarations. Browser length limits improve input behavior but must still be checked server-side when enforcing a security requirement.
Evidence in the complete study note
For a text input, size indicates approximate visible width, whereas maxlength limits entered text length.WEB09
A form’s action identifies its processing URL, method its submission method, and enctype its encoding.WEB09
An external sheet uses <link rel="stylesheet" href="styles.css"> in head; an internal sheet uses style; an inline declaration uses an element’s style attribute.WEB11
Choice by choice
A · correct — MAXLENGTH supplies the entered-text length limit.
B · incorrect — TYPE selects the input kind rather than a maximum length.
C · incorrect — ACTION belongs to form destination configuration.
D · incorrect — STYLE controls presentation rather than this input-length attribute.
Question 49
Which of the following is not JavaScript Data Types?
A. Undefined
B. Number
C. Boolean
D. Float
Hint / Module Reference (Where to Read)
Track the value and type at each operation, applying the stated conversion, indexing or mathematical rule.
Correct answer: D — Float is not a separate JavaScript primitive type.
WEB16 lists undefined, null, Boolean, Number, BigInt, String, and Symbol as primitives and explicitly states that Float is not a separate Number primitive type. Floating-point numeric values belong to Number. Undefined, Number, and Boolean are therefore valid type names in the offered set, leaving Float as the exclusion.
Evidence in the complete study note
JavaScript primitives are undefined, null, Boolean, Number, BigInt, String and Symbol; objects include arrays, functions and dates.WEB16
Float is not a separate Number primitive type.WEB16
Choice by choice
A · incorrect — Undefined is explicitly listed as a JavaScript primitive type in WEB16.
B · incorrect — Number is the JavaScript numeric primitive type that includes ordinary floating-point numeric values.
C · incorrect — Boolean is explicitly listed as the primitive type for true and false values.
D · correct — Float is not a separate JavaScript primitive type; ordinary floating-point values use Number.
Question 50
Which company developed JavaScript?
A. Netscape
B. Bell Labs
C. Sun Microsystems
D. IBM
Hint / Module Reference (Where to Read)
Check exact language syntax, declaration rules and execution context before reasoning about the result.
WEB15 explicitly states that JavaScript originated at Netscape and distinguishes it from Java. Netscape is therefore the company named by the supplied note. None of Bell Labs, Sun Microsystems, or IBM is the origin identified for JavaScript. The Java distinction is especially relevant because the similar language names can encourage a wrong company association.
Evidence in the complete study note
JavaScript originated at Netscape; it is distinct from Java and supports sophisticated applications through prototype-based objects and first-class functions.WEB15
Choice by choice
A · correct — Netscape is explicitly identified in WEB15 as the company where JavaScript originated.
B · incorrect — Bell Labs is not the JavaScript origin given in the complete study note.
C · incorrect — The note distinguishes JavaScript from Java and identifies Netscape, not Sun Microsystems, as its origin.
D · incorrect — IBM is not the company identified as JavaScript’s origin in WEB15.
Question 51
Inside which HTML element do we put the JavaScript?
A. <script>
B. <head>
C. <meta>
D. <style>
Hint / Module Reference (Where to Read)
Identify which elements a rule targets and distinguish selector syntax from declaration syntax.
Page 44 says JavaScript uses the script tag, and p.45 shows the enclosed script block. Evidence: PDF p. 44, PDF p. 45, PDF p. 28.
Evidence in the complete study note
Use <script src="app.js"></script> for an external .js file; script content has no HTML closing-tag syntax inside its JavaScript source.WEB15
<!DOCTYPE html> selects modern standards mode; <html> is the document root, <head> holds metadata, and <body> contains document content.WEB06
An external sheet uses <link rel="stylesheet" href="styles.css"> in head; an internal sheet uses style; an inline declaration uses an element’s style attribute.WEB11
Choice by choice
A · correct — Actual code-containing element.
B · incorrect — A possible surrounding document section, not the script element.
C · incorrect — Metadata element, not code container.
D · incorrect — Embedded stylesheet element, not JavaScript container.
Question 52
Which of the following is correct about features of JavaScript?
A. It can not Handling dates and time.
B. JavaScript is a object-based scripting language.
C. JavaScript is not interpreter based scripting language.
D. All of the above
Hint / Module Reference (Where to Read)
Track the value and type at each operation, applying the stated conversion, indexing or mathematical rule.
Correct answer: B — JavaScript supports prototype-based objects.
WEB15 says JavaScript supports sophisticated applications through prototype-based objects and first-class functions, directly supporting B. WEB16 also includes dates among objects, refuting the claimed inability to handle dates and time. The broad denial of interpreted scripting is not a supported language definition. Since at least A is false, All cannot hold; B is the supported positive feature.
Evidence in the complete study note
JavaScript originated at Netscape; it is distinct from Java and supports sophisticated applications through prototype-based objects and first-class functions.WEB15
JavaScript primitives are undefined, null, Boolean, Number, BigInt, String and Symbol; objects include arrays, functions and dates.WEB16
JavaScript implementations may interpret or compile source; interpretation and compilation are execution strategies rather than competing language identities.WEB-S05
Choice by choice
A · incorrect — The note includes Date objects, so the claim that JavaScript cannot handle dates and time is false.
B · correct — Prototype-based objects support the description of JavaScript as an object-based scripting language.
C · incorrect — This blanket denial is not a supported feature definition; browser JavaScript runs as scripts through its runtime.
D · incorrect — All fails because the date/time incapability claim is false, while the object-based feature is supported.
Question 53
Choose the correct JavaScript syntax to change the content of the following HTML code.
A. document.getElement ("letsfindcourse").innerHTML = "I am a letsfindcourse";
B. document.getElementById ("letsfindcourse").innerHTML = "I am a letsfindcourse";
C. document.getId ("letsfindcourse") = "I am a letsfindcourse";
D. document.getElementById ("letsfindcourse").innerHTML = I am a letsfindcourse;
Hint / Module Reference (Where to Read)
Track which node is selected or created, and distinguish changing content from attaching a node.
Correct answer: B — Use document.getElementById(...).innerHTML with a quoted string.
WEB20 identifies document.getElementById as the ID lookup and innerHTML as a descendant-markup replacement property. B combines the correct method spelling with a quoted string value. A and C invent lookup names; D lacks string quotes and cannot parse as the intended assignment. Execution still requires that the element exist, which should be checked in real code.
Evidence in the complete study note
document.getElementById("x") returns the matching element or null; querySelector(".item") returns the first match, and querySelectorAll returns a static NodeList.WEB20
innerHTML parses/replaces descendants, so += reparses/replaces the prior descendant content too and can destroy listeners/state.WEB20
Strings use either quote style, with appropriate escaping.WEB16
Choice by choice
A · incorrect — document.getElement is not the ID lookup method defined in WEB20.
B · correct — The exact ID lookup and quoted innerHTML assignment are valid, assuming that the requested element exists.
C · incorrect — document.getId is not the DOM method, and assigning directly to that call does not set element content.
D · incorrect — The intended replacement text is unquoted, so the JavaScript assignment is syntactically invalid.
Question 54
which of the following are advantages of JavaScript?
A. Less server interaction
B. Increased interactivity
C. Richer interfaces
D. All of the above
Hint / Module Reference (Where to Read)
Separate event dispatch, handler registration and cancellation of the browser default action.
Correct answer: D — All three are possible JavaScript benefits.
WEB01 assigns JavaScript programmable interactivity, and WEB21 describes browser checks that give immediate feedback. Such client work can avoid some server round trips, support richer controls, and increase interactivity. Each preceding option names a possible benefit rather than a guarantee of good implementation. The combined All choice therefore captures the full supported set.
Evidence in the complete study note
HTML supplies structure/meaning; CSS controls presentation; JavaScript supplies programmable interactivity.WEB01
Browser checks improve feedback; repeat validation and authorization on the server.WEB21
Choice by choice
A · incorrect — Local client computation can avoid some requests, but this option states only one of the listed benefits.
B · incorrect — JavaScript supplies programmable interactivity, but this is only part of the full supported set.
C · incorrect — Programmable controls can provide richer interfaces, alongside the other possible benefits.
D · correct — Reduced requests for local work, interactivity, and richer interfaces are all possible benefits of browser JavaScript.
Question 55
Which statement is true about modern JavaScript and browser capabilities?
A. Browser scripts cannot freely read or write arbitrary client files without an appropriate API and permission
B. JavaScript cannot be used for networking applications
C. JavaScript doesn't have any multi-threading or multiprocessor capabilities
D. All of the above
Hint / Module Reference (Where to Read)
Identify the execution side and communication pattern, keeping runtime, transport, data format and callback roles distinct.
Correct answer: A — Browser scripts cannot freely read or write arbitrary client files without an appropriate API and permission
Modern JavaScript can make network requests and can use workers for concurrent computation. Browser scripts may also access selected files or devices through permission-based APIs, so their restriction is on unrestricted access, not all file interaction. The first choice states that boundary precisely. The two remaining capability denials are false, which also makes All of the above false. The answer distinguishes host permissions from the expressive power of the language.
Evidence in the complete study note
Browser scripts are sandboxed, but may access selected files/devices through permission-based APIs.WEB01
Browser workers support concurrent computation, but DOM access normally remains on the page’s main thread.WEB22
With fetch, await fetch(url) obtains a response, then check response.ok and parse await response.json().WEB34
Choice by choice
A · correct — The sandbox does not allow arbitrary unrestricted file access.
B · incorrect — Browser network APIs and server runtimes refute this denial.
C · incorrect — Workers provide concurrent computation, refuting this absolute denial.
D · incorrect — The networking and concurrency denials are false.
Question 56
Microsoft has developed a popular HTML editor called?
A. Dreamweaver
B. FrontPage
C. HomeSite
D. Macromedia
Hint / Module Reference (Where to Read)
Identify the role requested and compare it with the definitions and constraints in the cited passages.
WEB02 explicitly identifies Microsoft FrontPage and Macromedia HomeSite5 as historical editors. Therefore FrontPage is the Microsoft editor requested. HomeSite belongs to the other attribution given in the note; Macromedia is a company name rather than the Microsoft product. This is historical product recognition, not a current editor recommendation.
Evidence in the complete study note
Historical editor-name items refer to Microsoft FrontPage and Macromedia HomeSite5, not languages or required modern tools.WEB02
Choice by choice
A · incorrect — Dreamweaver is not the Microsoft editor identified in the supplied historical attribution.
B · correct — WEB02 explicitly identifies FrontPage as the historical Microsoft editor.
C · incorrect — HomeSite5 is attributed to Macromedia rather than Microsoft in the note.
D · incorrect — Macromedia is the company in the HomeSite attribution, not the requested Microsoft editor name.
Question 57
HomeSite 5 is a well-liked HTML and JavaScript editor from Macromedia.
A. True
B. False
C. Can be true or false
D. Cannot say
Hint / Module Reference (Where to Read)
Identify the role requested and compare it with the definitions and constraints in the cited passages.
Correct answer: A — True as a historical product attribution.
WEB02 explicitly identifies Macromedia HomeSite5 as a historical editor. That supports the product-and-company attribution in the statement. Well-liked is an informal popularity description, not a measurable language or browser property supplied here. On the factual historical attribution being tested, True is the supported choice; the note does not recommend the product as a current required editor.
Evidence in the complete study note
Historical editor-name items refer to Microsoft FrontPage and Macromedia HomeSite5, not languages or required modern tools.WEB02
Choice by choice
A · correct — The historical attribution to Macromedia HomeSite5 is explicitly supported by WEB02.
B · incorrect — False contradicts the product-and-company attribution given in the complete note.
C · incorrect — The historical attribution is settled in the note rather than varying between true and false.
D · incorrect — The note supplies the historical attribution needed to answer the factual part of the statement.
Question 58
Outside strings and comments, in a context where token boundaries are preserved and line breaks cannot trigger different parsing or automatic semicolon insertion, which single option gives the complete selection of whitespace that can be ignored?
A. spaces
B. tabs
C. newlines
D. All of the above
Hint / Module Reference (Where to Read)
Check exact language syntax, declaration rules and execution context before reasoning about the result.
JavaScript normally uses whitespace to separate tokens. In the explicitly restricted context, extra spaces, tabs and newlines can all be removed without changing the program’s meaning. The exclusions matter: whitespace inside strings is data, and line breaks can change parsing in other contexts. All of the above is therefore the complete single choice here; each individual whitespace kind is eligible but would be an incomplete selection.
Evidence in the complete study note
Whitespace usually separates tokens but newlines can affect parsing, especially after return.WEB15
Choice by choice
A · incorrect — Spaces qualify here, but this choice omits the other qualifying whitespace.
B · incorrect — Tabs qualify here, but this choice is incomplete.
C · incorrect — Newlines qualify under the explicit parsing restriction, but this choice is incomplete.
D · correct — This includes all three qualifying whitespace kinds in the stated context.
Question 59
JavaScript is designed for following purpose -
A. to style HTML pages
B. to execute Queries related to databases on a server
C. to add interactivity to html pages
D. All of the above
Hint / Module Reference (Where to Read)
Identify the role requested and compare it with the definitions and constraints in the cited passages.
WEB16 states that + can concatenate when a string is involved. Here string1 is Letsfindcourse and intvalue is number 30, so the numeric operand is represented as text and appended to the string. Neither operand contains a trailing or leading space. The alert therefore displays Letsfindcourse30, not the spaced version.
Evidence in the complete study note
+ can concatenate when a string is involved; arithmetic / converts ordinary numeric strings.WEB16
alert displays information, confirm returns a Boolean, and prompt requests text or returns null on cancellation.WEB22
Choice by choice
A · incorrect — The code contains no separator space between the string and number, so this adds an unwritten character.
B · incorrect — The original string is retained by concatenation rather than discarded.
C · correct — The string operand triggers concatenation, appending 30 directly with no extra space.
D · incorrect — String-plus-number concatenation is valid JavaScript and does not throw merely because the operand types differ.
Question 61
Among the following, which one is a ternary operator in JavaScript?
A. #
B. ::
C. &:
D. ?:
Hint / Module Reference (Where to Read)
Track the value and type at each operation, applying the stated conversion, indexing or mathematical rule.
Correct answer: B — the initialization, the test, and the update
The general form is for(initialization; test; update). Initialization runs once, the test decides whether another iteration starts, and the update follows each completed body. An update can increment, decrement or perform another expression. Therefore an increment-only description is narrower than the general clause name. The first alternative also omits the test, so the aggregate alternative is incorrect.
Evidence in the complete study note
for(initialization;test;update) initializes once, checks before each iteration, then updates after each body.WEB19
Choice by choice
A · incorrect — Incrementation and update overlap, and the condition/test clause is missing.
B · correct — These are the three general clause names, independent of the particular update expression.
C · incorrect — Incrementing is one possible update; it is not the general name for a clause that may instead decrement or do something else.
D · incorrect — The first alternative omits the test, and the increment-only alternative is not the general form.
Question 63
Which JavaScript operators compare equality and inequality without type coercion, while == and != remain available for coercive comparison?
A. It uses bitwise checking
B. === and !==
C. It uses equals() and notequals() instead
D. It uses equalto()
Hint / Module Reference (Where to Read)
Track the value and type at each operation, applying the stated conversion, indexing or mathematical rule.
JavaScript supports both loose and strict equality operators. == and != can coerce types, while === and !== compare without that coercion. The strict operators are alternatives with different comparison rules rather than replacements that remove the loose operators from the language. Bitwise checking and the invented equality function names do not identify these language operators, so the corrected question has a single supported answer.
Evidence in the complete study note
JavaScript has ==/!= with coercion and ===/!== without coercion; strict operators do not replace or remove the loose ones.WEB17
Choice by choice
A · incorrect — Bitwise operations are different from strict equality comparisons.
B · correct — These are the strict equality and inequality operators.
C · incorrect — These function names are not the language’s strict comparison operators.
D · incorrect — This is not the language’s strict equality operator.
Question 64
What should appear at the very end of your JavaScript?The <script language="javascript"> tag
A. <script>
B. </script>
C. </script language="javascript">
D. All of the above
Hint / Module Reference (Where to Read)
Check exact language syntax, declaration rules and execution context before reasoning about the result.
A quoted "use strict" in a directive prologue selects strict semantics. It is not a reserved keyword introducing a special statement form, although the quoted text is syntactically an expression statement. By contrast, if introduces a conditional statement, with names a legacy scope-lookup statement forbidden in strict mode, and debugger names a statement that can invoke a debugger facility.
Evidence in the complete study note
“use strict” is a directive string, not a reserved statement keyword.WEB15
An if statement conditionally executes code.WEB-S05
The legacy with statement temporarily extends name lookup and is forbidden in strict mode.WEB-S05
A debugger statement may invoke an active debugging facility.WEB-S05
Choice by choice
A · incorrect — if names the conditional statement form, so it is not the requested non-keyword directive.
B · incorrect — with names a statement form, even though strict mode restricts its use.
C · incorrect — debugger names a JavaScript statement form rather than a directive string.
D · correct — "use strict" is a directive string, not a reserved statement keyword; technically its quoted form is an expression statement.
Question 66
Which symbol is used for comments in JavaScript?
A. \\
B. //
C. \* *\
D. \* */
Hint / Module Reference (Where to Read)
Check exact language syntax, declaration rules and execution context before reasoning about the result.
The comment rule explicitly uses // for a single line and /* */ for multiline (p.46). All alternatives except B reverse slash direction. Evidence: PDF p. 46.
Evidence in the complete study note
// comments end at line end; /* */ span a block.WEB15
Choice by choice
A · incorrect — Backslashes are not the rule.
B · correct — Exact single-line delimiter.
C · incorrect — Backslash-star is not forward-slash-star.
D · incorrect — Incorrect opening backslash, even though closing portion resembles a block end.
Question 67
Which of them is not the looping structures in JavaScript?
A. for
B. while
C. forwhich
D. dowhile
Hint / Module Reference (Where to Read)
Identify the role requested and compare it with the definitions and constraints in the cited passages.
Correct answer: C — forwhich is not a JavaScript loop form.
WEB19 defines for, while, and do...while loops. The option dowhile names that last construct informally; its actual source spelling is do ... while. forwhich is not one of the language’s loop forms. Thus C is the intended non-loop name without treating informal collapsed words as executable source tokens.
Evidence in the complete study note
for(initialization;test;update) initializes once, checks before each iteration, then updates after each body.WEB19
while checks before its body; do...while executes at least once.WEB19
Choice by choice
A · incorrect — for is explicitly a JavaScript loop form with initialization, test, and update clauses.
B · incorrect — while is explicitly a loop that tests before its body.
C · correct — forwhich is not a defined JavaScript loop form in the note.
D · incorrect — Read as the loop name do...while, this is the supported at-least-once construct, not a literal token.
Question 68
Which operations evaluate to undefined in ordinary JavaScript? A variable read means a direct expression read, not typeof. Select all that apply.
A. Directly reading an undeclared variable
B. Reading a declared var variable before it has been assigned a value
C. Reading a missing property of an ordinary object
D. All of the above
Hint / Module Reference (Where to Read)
Track the value and type at each operation, applying the stated conversion, indexing or mathematical rule.
Correct answers (select all): B, C — Reading a declared var variable before it has been assigned a value; Reading a missing property of an ordinary object
An unassigned declared var variable has the value undefined, and an absent ordinary object property also evaluates to undefined. A direct read of an undeclared variable instead normally throws ReferenceError. The question excludes typeof and uses var to avoid a block-scoped temporal-dead-zone case. Both B and C must be selected; All of the above is false because it would include the undeclared-variable read.
Evidence in the complete study note
An unassigned declared variable or missing ordinary object property evaluates to undefined; directly reading an undeclared variable usually throws ReferenceError.WEB16
var has function/global scope; let/const are block-scoped.WEB15
Choice by choice
A · incorrect — A direct undeclared-variable read throws ReferenceError.
B · correct — An unassigned var binding evaluates to undefined.
C · correct — An absent ordinary object property evaluates to undefined.
D · incorrect — This includes A, which throws instead of producing undefined.
Question 69
What are the types of Pop up boxes available in JavaScript?
A. Alert
B. Prompt
C. Confirm
D. All of the above
Hint / Module Reference (Where to Read)
Distinguish the browser object or dialog role from the kind of response it collects.
Prompt shows an input modal, confirm a choice modal (p.46), and alert an informational popup (p.47). Thus all three listed dialog forms are covered. Evidence: PDF p. 46, PDF p. 47.
Evidence in the complete study note
alert(message), confirm(message) and prompt(message) all present a supplied message.WEB-S03
alert displays information, confirm returns a Boolean, and prompt requests text or returns null on cancellation.WEB22
Choice by choice
A · incorrect — A covered popup, but not the full list.
B · incorrect — A covered input popup.
C · incorrect — A covered confirmation popup.
D · correct — Combines the three documented forms.
Question 70
what is the disadvantage of using innerHTML in JavaScript?
A. Content cannot be replaced everywhere
B. We can use like "appending to innerHTML"
C. Even if you use +=like "innerHTML = innerHTML + 'html'" still the old content is replaced by html
D. The entire innerHTML content is not re-parsed and build into elements, therefore its not slower
Hint / Module Reference (Where to Read)
Track which node is selected or created, and distinguish changing content from attaching a node.
Correct answer: C — Even innerHTML += reparses and replaces descendant nodes.
WEB20 says innerHTML parses and replaces descendants. The += form reads the old markup string, concatenates new markup, and assigns the entire result, so prior descendants are recreated rather than preserved. Existing node listeners or state can be lost. C captures that disadvantage; D explicitly denies the reparsing behavior and is false.
Evidence in the complete study note
innerHTML parses/replaces descendants, so += reparses/replaces the prior descendant content too and can destroy listeners/state.WEB20
Choice by choice
A · incorrect — This vague restriction is not the specific innerHTML drawback established here.
B · incorrect — Using apparent append syntax is possible; the disadvantage is that it still replaces and reparses existing descendants.
C · correct — The += assignment reparses and replaces prior descendant content, potentially losing node listeners and state.
D · incorrect — The note says the entire assigned markup is reparsed; this option incorrectly denies that mechanism.
Question 71
What are the two basic groups of dataypes in JavaScript?
A. Primitive
B. Reference types.
C. All of the above
D. None of the above
Hint / Module Reference (Where to Read)
Track the value and type at each operation, applying the stated conversion, indexing or mathematical rule.
Correct answer: C — Both primitive and object/reference groups.
WEB16 lists primitive values and contrasts them with objects such as arrays, functions, and dates. In the informal two-group teaching model, those object values are often called reference types. A and B each name only one group; All combines the two categories requested. This does not make Array a separate primitive or replace the detailed primitive-type list.
Evidence in the complete study note
JavaScript primitives are undefined, null, Boolean, Number, BigInt, String and Symbol; objects include arrays, functions and dates.WEB16
Arrays are objects, even though informal texts call them an array data type.WEB16
Choice by choice
A · incorrect — Primitive names one of the two requested groups but omits the object/reference group.
B · incorrect — Reference types informally names the object group but omits the primitive group.
C · correct — All combines primitives and the informal object/reference group, supplying both categories requested.
D · incorrect — The note explicitly distinguishes primitives from objects, so the two-group classification is available.
Question 72
Which of the following are the errors in JavaScript?
A. Load time errors
B. Run time errors:
C. Logical Errors:
D. All of the above
Hint / Module Reference (Where to Read)
Check exact language syntax, declaration rules and execution context before reasoning about the result.
Correct answer: D — All three broad error categories.
WEB19 distinguishes parse-time syntax errors, runtime thrown errors, and logical errors. Interpreting load time errors as the question’s broad label for parse/load failures, all three listed categories are valid. They differ in when and how failure appears: parsing may prevent execution, runtime errors occur during execution, and logical errors can produce incorrect results without throwing.
Evidence in the complete study note
A syntax error prevents source from being parsed successfully.WEB-S05
A runtime error arises while executing a program.WEB-S05
A logical error is a defect in the algorithm or expression that can produce an incorrect result without throwing an exception.WEB-S05
Choice by choice
A · incorrect — Parse or load failures are a valid broad error category, but this option omits the other listed categories.
B · incorrect — Thrown execution errors are runtime errors, but they are only one of the listed categories.
C · incorrect — Logical errors can produce wrong results without throwing, but they are not the only error category.
D · correct — All covers the broad parse/load, runtime, and logical-error categories distinguished in the note.
Question 73
Which JavaScript function capability is illustrated by storing a function in a variable and passing it as an argument?
A. First-class functions
B. Functions restricted to class-member calls
C. Functions restricted to one fixed call site
D. All of the above
Hint / Module Reference (Where to Read)
Check exact language syntax, declaration rules and execution context before reasoning about the result.
JavaScript functions can be stored and passed as values. This is the first-class-function capability: a function can be assigned to a variable and supplied as an argument. Functions are not restricted to class-member invocation or one fixed call site. Those restrictions conflict with the stated ability to pass a function value, so the aggregate alternative is also false.
Evidence in the complete study note
function f(x){return x*2;} has a parameter and returns a value; functions can be passed/stored like other values.WEB19
JavaScript originated at Netscape; it is distinct from Java and supports sophisticated applications through prototype-based objects and first-class functions.WEB15
Choice by choice
A · correct — Storing and passing a function as a value is the first-class-function capability.
B · incorrect — A function value can be stored and passed outside a class-member call; JavaScript does not impose this restriction.
C · incorrect — Passing a function value allows its use at other call sites, contradicting the proposed fixed-site restriction.
D · incorrect — The restrictions in the other two alternatives conflict with first-class function values, so the aggregate is false.
Question 74
Which exact name is not a standard screen property in a normal browser page?
A. availHeight
B. colorsDepth
C. availWidth
D. colorDepth
Hint / Module Reference (Where to Read)
Distinguish the browser object or dialog role from the kind of response it collects.
JavaScript property names are case-sensitive. The standard names are availHeight, availWidth and colorDepth, all with the shown camelCase spelling. The distractor colorsDepth has an extra s and is not the standard color-depth property. The valid names use their exact case-sensitive spelling.
Evidence in the complete study note
screen.availHeight, screen.availWidth and screen.colorDepth have exact camelCase spelling; ColorsDepth is not the property.WEB22
Choice by choice
A · incorrect — This is the exact available-height property name.
B · correct — The extra s makes this different from colorDepth.
C · incorrect — This is the exact available-width property name.
D · incorrect — This is the exact color-depth property name.
Question 75
JavaScript string using double quotes is exactly the same as a string using single quotes?
A. True
B. False
Hint / Module Reference (Where to Read)
Track the value and type at each operation, applying the stated conversion, indexing or mathematical rule.
The module lists single and double quotes as two valid ways to surround strings (p.47). For identical content requiring no different escaping, they represent the same string value. Evidence: PDF p. 47.
Evidence in the complete study note
Strings use either quote style, with appropriate escaping.WEB16
Choice by choice
A · correct — Correct for the same content under the stated assumption.
B · incorrect — No difference in value solely from the quote choice is described.
Question 76
What does this JavaScript output?
var a = "20";
var b = a = 30;
document.write(a + b);
A. Error in Script
B. '20'30
C. 2030
D. 60
Hint / Module Reference (Where to Read)
Track the value and type at each operation, applying the stated conversion, indexing or mathematical rule.
Assignment first stores the Number 30 in a, replacing its previous string value, and then assigns that same Number to b. At the addition, both operands are therefore numeric thirty. Their sum is sixty, which document.write emits. The choice supplies the computed result rather than preserving the incorrect fifty. String concatenation does not occur because the original string no longer remains in either operand.
Evidence in the complete study note
var a="20"; var b=a=30; assigns Number 30 to both, so a+b is 60, not 50.WEB17
Choice by choice
A · incorrect — The assignments and addition are valid JavaScript.
B · incorrect — The original string has been replaced and quotes are not emitted.
C · incorrect — Neither operand is the string twenty when addition occurs.
D · correct — Both operands are Number 30, giving the supplied numeric sum.
Question 77
What is divide by 0 in JavaScript?
var a = 10;var b = 0;document.write(a/b);
A. Nothing is printed
B. 0 is printed
C. Infinity is printed
D. Some Garbage Value
Hint / Module Reference (Where to Read)
Track the value and type at each operation, applying the stated conversion, indexing or mathematical rule.
WEB16 states that a nonzero Number divided by zero produces signed Infinity. Here a is positive 10 and b is positive zero, so a/b yields positive Infinity. document.write converts that value to its displayed text. This is not the 0/0 case, which produces NaN, and ordinary Number division does not yield an arbitrary garbage value.
Evidence in the complete study note
"abc"/"def" produces NaN; nonzero Number divided by zero produces signed Infinity, while 0/0 produces NaN.WEB16
Choice by choice
A · incorrect — The expression evaluates to Infinity and document.write displays its text, so output is not empty.
B · incorrect — Dividing positive ten by zero does not produce zero under JavaScript Number arithmetic.
C · correct — A positive nonzero Number divided by positive zero yields Infinity, which is printed.
D · incorrect — JavaScript defines this result as Infinity rather than an unspecified garbage value.
Question 78
Which of the following function of Array object applies a function simultaneously against two values of the array (from right-to-left) as to reduce it to a single value?
A. pop()
B. reduce()
C. push()
D. reduceRight()
Hint / Module Reference (Where to Read)
Track the value and type at each operation, applying the stated conversion, indexing or mathematical rule.
Correct answer: D — reduceRight(), applied sequentially from right to left.
WEB18 distinguishes reduce from reduceRight by traversal direction. reduceRight combines an accumulator with each element from right to left, giving the single accumulated result described. The stem’s simultaneously is inaccurate: callbacks are sequential, not parallel. Pop and push change the array’s end, while reduce processes left to right. D uniquely matches the intended directional reduction.
Evidence in the complete study note
reduce combines sequentially from left to right; reduceRight combines sequentially from right to left with an accumulator, not simultaneous parallel execution.WEB18
Array push/pop add/remove at the end; unshift/shift act at the beginning.WEB18
Choice by choice
A · incorrect — pop removes the last item and does not repeatedly combine items into an accumulated result.
B · incorrect — reduce combines left to right, contrary to the direction specified in the question.
C · incorrect — push appends items at the array end rather than reducing existing items to one accumulated value.
D · correct — reduceRight performs the requested right-to-left reduction, but sequentially rather than literally simultaneously.
Question 79
What is the output of following Javascript?var a = 'letsfind';var b = 'course';var c = a/b;document.write(c);
A. letsfindcourse
B. letsfind/course
C. NaN
D. None of the above
Hint / Module Reference (Where to Read)
Track the value and type at each operation, applying the stated conversion, indexing or mathematical rule.
WEB16 says arithmetic division converts ordinary numeric strings and gives NaN when nonnumeric strings are divided. Neither letsfind nor course is a numeric string, so a/b cannot produce a meaningful Number and evaluates to NaN. Division does not concatenate strings or insert a slash into displayed text. document.write therefore prints NaN.
Evidence in the complete study note
+ can concatenate when a string is involved; arithmetic / converts ordinary numeric strings.WEB16
"abc"/"def" produces NaN; nonzero Number divided by zero produces signed Infinity, while 0/0 produces NaN.WEB16
Choice by choice
A · incorrect — Concatenation would use + with strings; the source instead applies arithmetic division.
B · incorrect — The slash is an operator, not a literal character appended between the two strings.
C · correct — Both operands are nonnumeric strings, so numeric division evaluates to NaN and that text is written.
D · incorrect — NaN is explicitly offered and matches the defined conversion result.
Question 80
What does the following JavaScript code write? var a = 1; document.write(a--); document.write(a);
A. 00
B. 01
C. 11
D. 10
Hint / Module Reference (Where to Read)
Track the value and type at each operation, applying the stated conversion, indexing or mathematical rule.
The source uses a-- despite the introductory mention of ++. Starting with a=1, postfix decrement yields the old value 1 to the first write and then changes a to 0. The second write outputs 0. No separator is written between calls, so the displayed result is 10, exactly as WEB17 explains.
Evidence in the complete study note
With a=1, printing a-- then a prints10.WEB17
Postfix a++ yields the old value and then increments a.WEB17
Choice by choice
A · incorrect — Postfix decrement yields the original one for the first write, so the first digit cannot be zero.
B · incorrect — This reverses the old-value and updated-value order of the two writes.
C · incorrect — The decrement changes a to zero before the second write, so the second digit is not one.
D · correct — The first write gets old value one, then the second gets updated zero, yielding adjacent text 10.
Question 81
Find output of below JavaScript addition codedocument.write("1 plus 1 is " + 1 + 1);
A. 2
B. 1 plus 1 is 2
C. 1 plus 1 is 11
D. 1 plus 1 is 1 + 1
Hint / Module Reference (Where to Read)
Track the value and type at each operation, applying the stated conversion, indexing or mathematical rule.
WEB17 explicitly traces this expression. Starting with a string makes the first + concatenate the first numeric 1, producing a longer string. The next + then concatenates the second 1 rather than adding numbers. The original literal supplies the words and spaces, while the two appended digits have no extra separator. The result is 1 plus 1 is 11.
Evidence in the complete study note
"1 plus 1 is "+1+1 concatenates left to right to "1 plus 1 is 11".WEB17
Choice by choice
A · incorrect — The initial string is retained, and the two numbers are not added together first.
B · incorrect — This would require grouping the numeric addition before concatenating it with the initial string.
C · correct — Left-to-right evaluation concatenates each one to the existing string, producing the final digits 11.
D · incorrect — The plus signs are operators rather than literal characters in the output string.
Question 82
In JavaScript, Arrays are data type. State True or False
A. True
B. False
Hint / Module Reference (Where to Read)
Track the value and type at each operation, applying the stated conversion, indexing or mathematical rule.
The data-type discussion explicitly includes arrays and defines them as regular objects storing indexed values. True fits the broad teaching use of data type; this does not mean arrays are a separate primitive type. Evidence: PDF p. 48.
Evidence in the complete study note
Arrays are objects, even though informal texts call them an array data type.WEB16
Choice by choice
A · correct — Arrays are included in the type discussion as objects.
B · incorrect — False would require the narrower unspoken meaning of separate primitive type.
Question 83
Does JavaScript allow exception handling?
A. Yes, it provides try, catch as well as throw key word for exception handling
B. Yes, but it provides only try block
C. Yes, but it provides only Try catch block, but does not allow throw exception
D. No
Hint / Module Reference (Where to Read)
Identify the role requested and compare it with the definitions and constraints in the cited passages.
Correct answer: A — Yes: try, catch, and throw are supported.
WEB19 explicitly states that try/catch handles thrown errors during execution and throw signals an error. Thus A includes both handling and signaling mechanisms. The alternatives claiming only try, denying throw, or denying exception handling contradict that rule. This concerns runtime exception handling; it does not imply that every parse-time or logical error is caught automatically.
Correct answer: A — isNaN(), with coercion caveats.
WEB16 distinguishes global isNaN, which converts its argument first, from Number.isNaN, which does not. Of the offered names, isNaN is the actual check for a NaN result after coercion. It is not a universal test for whether the original argument’s type is Number. Neither nonNaN nor calling NaN as a function supplies the described API.
Evidence in the complete study note
Global isNaN(value) tests whether conversion to Number produces NaN.WEB-S08
NaN is itself a special numeric value, not a callable checking function.WEB-S08
Choice by choice
A · correct — Global isNaN exists and tests for NaN after numeric conversion; it is not a pure original-type test.
B · incorrect — nonNaN() is not the check named in the supplied JavaScript API rule.
C · incorrect — NaN is the special numeric value, not the callable checking function offered here.
D · incorrect — isNaN is offered and matches the intended check, subject to the note’s coercion caveat.
Question 85
What does parseInt("12.8", 10) return in JavaScript?
A. Throws Error
B. It returns the decimal values in string form
C. The Number value 12
D. None of the listed option
Hint / Module Reference (Where to Read)
Track the value and type at each operation, applying the stated conversion, indexing or mathematical rule.
parseInt reads digits in the supplied radix until it reaches a character that cannot continue that integer representation. Here it consumes the digits before the decimal point and stops at the point, returning Number 12. It does not round the decimal value, return a string or throw merely because a decimal point appears. The concrete string avoids claiming that every decimal-looking input has a usable leading integer prefix.
Evidence in the complete study note
parseInt("12.8",10) reads12, stopping at the dot; this is parsing, not rounding.WEB16
Choice by choice
A · incorrect — A decimal point after an initial digit sequence does not require an exception.
B · incorrect — The return value is a Number, not a string containing the decimal.
C · correct — The radix-ten digit prefix yields Number 12.
D · incorrect — A listed choice gives the actual result.
Question 86
What is the output of below JavaScript code?alert (type of new Date() );
A. Throws Error
B. object
C. Displays Nothing
D. Current Date
Hint / Module Reference (Where to Read)
Track the value and type at each operation, applying the stated conversion, indexing or mathematical rule.
Correct answer: A — Syntax error: the source says type of rather than typeof.
type of new Date() is invalid JavaScript syntax; the operator is typeof, written as one word. Therefore the shown program errors before displaying an ordinary value. typeof new Date() would evaluate to "object", but that is a different expression from the code shown.
Evidence in the complete study note
A literal type of expression is not the typeof operator.WEB19
x=4+"4"5 is a syntax error because an operator is missing; bool ans=true and type of new Date() are syntax errors too.WEB41
typeof new Date() is "object"; typeof null is historically "object".WEB16
Choice by choice
A · correct — The spaced text type of is not the typeof operator, causing a syntax error in the literal source.
B · incorrect — object is the result after repairing type of to typeof, which the task has not authorized.
C · incorrect — The primary result is a syntax error, not successful execution with an intentionally empty display.
D · incorrect — A valid typeof expression reports a type, rather than the current date value.
Question 87
What if we put ++ operator inside if condition? find the output of below code<script>var a = 10;if(a == a++)document.write(a);</script>
A. Error
B. Nothing is printed
C. 10
D. 11
Hint / Module Reference (Where to Read)
Track the value and type at each operation, applying the stated conversion, indexing or mathematical rule.
WEB17 traces this exact JavaScript pattern. The left operand reads 10; postfix a++ yields old 10 and then sets a to 11. Equality therefore compares 10 with 10 and is true. The body runs after the increment and writes the updated value 11. These JavaScript evaluation rules should not be replaced with C/C++ assumptions.
Evidence in the complete study note
Postfix a++ yields the old value and then increments a.WEB17
If a=10, a==a++ compares10 with10, then the body sees11.WEB17
Choice by choice
A · incorrect — The expression is valid JavaScript; its specified evaluation order does not produce the supposed error.
B · incorrect — The comparison uses old ten on both sides and is true, so the body does execute.
C · incorrect — Ten is the compared old value, but the increment has completed before document.write reads a.
D · correct — The equality succeeds using old values, then the body prints the updated value eleven.
Question 88
An inline onkeydown handler returns false for a cancelable keydown event whose default action is text insertion. Which statement correctly describes the cancellation?
A. The default text-insertion action associated with the handled keydown is canceled
B. A later keypress handler retroactively cancels the earlier keydown event
C. The keyup event is necessarily prevented from being dispatched
D. Every later keyboard event is necessarily canceled
Hint / Module Reference (Where to Read)
Separate event dispatch, handler registration and cancellation of the browser default action.
Correct answer: A — The default text-insertion action associated with the handled keydown is canceled
An appropriate inline event handler can use a false return value to cancel the handled event’s default action. With the cancelable text-insertion action specified here, that default action is stopped. This does not erase an earlier event or guarantee that later keyboard events disappear. The distinction is between canceling a default behavior and suppressing an entire sequence of event dispatches; addEventListener would require preventDefault instead.
Evidence in the complete study note
Returning false from an addEventListener callback does not cancel it; return false works in an appropriate inline/onsubmit property handler whose caller uses that return.WEB21
For cancelable keyboard defaults, call preventDefault rather than assuming a different key event itself disappears.WEB21
Choice by choice
A · correct — The inline handler convention consumes false to cancel the specified default action.
B · incorrect — A later handler cannot undo the dispatch of an earlier event.
C · incorrect — Canceling a default action does not guarantee suppression of keyup dispatch.
D · incorrect — The cancellation concerns the handled default action, not every later event.
Question 89
The _______ method of an Array object adds and/or removes elements from an array.
A. Reverse
B. Shift
C. Slice
D. Splice
Hint / Module Reference (Where to Read)
Track the value and type at each operation, applying the stated conversion, indexing or mathematical rule.
WEB18 defines splice(start,deleteCount,...items) as mutating an array by removing and inserting elements. That is the combined operation in the stem. The options capitalize method names as terms; the actual JavaScript call is lowercase splice(). reverse changes order, shift removes only the first item, and slice produces a shallow copy rather than that mutation.
Evidence in the complete study note
slice returns a selected shallow copy; splice(start,deleteCount,...items) mutates by removal/insertion.WEB18
reverse reverses in place.WEB18
Array push/pop add/remove at the end; unshift/shift act at the beginning.WEB18
Choice by choice
A · incorrect — reverse() changes element order in place rather than adding or removing the requested entries.
B · incorrect — shift() removes one first element; it is not the general combined insertion/removal method.
C · incorrect — slice() returns a shallow copy of a selected range rather than mutating through insertion or removal.
D · correct — The actual lowercase splice() method removes and optionally inserts entries in the original array.
Question 90
The term PHP is an acronym for PHP:_______________.
A. Hypertext Preprocessor
B. Hypertext multiprocessor
C. Hypertext markup Preprocessor
D. Hypertune Preprocessor
Hint / Module Reference (Where to Read)
Check exact language syntax, declaration rules and execution context before reasoning about the result.
In the web execution model used here, PHP runs on the server, generates responses and can access databases. The browser receives its output rather than executing the PHP source as its client-side script. Client-side interactivity is supplied by languages such as JavaScript. Thus server-side scripting is the matching category, and the combined alternative incorrectly adds client-side execution.
Evidence in the complete study note
PHP, Python, JSP/Java and ASP.NET applications generate server responses and access databases; C# is commonly used with ASP.NET.WEB01
It can emit ordinary text and HTML.WEB23
Choice by choice
A · incorrect — User-side is not the server-execution category described for PHP.
B · incorrect — Client-side scripting runs in the browser, whereas the described PHP processing runs on the server.
C · correct — PHP is the server-side scripting language in this web application model.
D · incorrect — This combines the correct server role with a client-side role that does not apply to PHP source in the described model.
Question 92
PHP files have a default file extension of_______.
A. .html
B. .xml
C. .php
D. .hphp
Hint / Module Reference (Where to Read)
Check exact language syntax, declaration rules and execution context before reasoning about the result.
The standard PHP delimiter pair shown on p.60 is <?php followed by ?>. Both markers are necessary to match the demonstrated embedded-code form. Evidence: PDF p. 60.
Evidence in the complete study note
Use <?php ...WEB23
Choice by choice
A · incorrect — Closing marker lacks question mark.
B · incorrect — Opening and closing markers are incomplete.
C · incorrect — Neither marker has angle brackets.
D · correct — Matches both standard markers.
Question 94
Which of the below statements is equivalent to $sub -= $sub?
A. $sub = $sub
B. $sub = $sub -$sub
C. $sub = $sub - 1
D. $sub = $sub - $sub - 1
Hint / Module Reference (Where to Read)
Trace the bindings and operations in order; preserve the exact string characters and distinguish returned values from emitted output.
WEB26 explicitly expands $sub-=$sub into $sub=$sub-$sub. Compound subtraction uses the existing left-side value minus the stated right-side value and stores the result back. Here both references name the same value; no constant one is subtracted. The expression is therefore not decrement and does not preserve the old value by simple reassignment.
Evidence in the complete study note
$sub-=$sub is $sub=$sub-$sub, not decrement.WEB26
Choice by choice
A · incorrect — Simple self-assignment leaves the value unchanged rather than subtracting the right-hand operand.
B · correct — This is the exact expansion of compound subtraction with $sub on both sides.
C · incorrect — Subtracting one is decrement; the actual right-hand operand is $sub rather than the constant one.
D · incorrect — The extra subtraction of one is absent from the compound assignment and changes its meaning.
Question 95
Which PHP statement reliably outputs the literal characters $lfc, regardless of the variable’s current value?
A. echo "$lfc";
B. echo "$$lfc";
C. echo '$lfc';
D. echo "$lfc;";
Hint / Module Reference (Where to Read)
Identify the role requested and compare it with the definitions and constraints in the cited passages.
Double-quoted PHP strings interpolate variable names, so the unescaped occurrences of $lfc depend on the variable’s value. A single-quoted string normally preserves the dollar name literally and therefore emits the requested characters. Extra dollar signs or quoted semicolons do not turn the remaining double-quoted choices into reliable literal output. The option changes the quoting rather than assuming a convenient variable value.
Evidence in the complete study note
Double-quoted strings interpolate variables and escapes such as \n; single quotes normally preserve dollar names literally.WEB24
To emit literal $lfc use echo '$lfc'; or escape the dollar in double quotes.WEB24
Choice by choice
A · incorrect — Double quotes interpolate the variable’s value.
B · incorrect — The extra dollar sign does not prevent interpolation of $lfc.
C · correct — Single quotes preserve the dollar name as literal text.
D · incorrect — The variable is interpolated and the semicolon inside the string is also output.
Question 96
Which of the below symbol is a newline character?
A. \r
B. \n
C. /r
D. /n
Hint / Module Reference (Where to Read)
Identify the role requested and compare it with the definitions and constraints in the cited passages.
WEB24 identifies \n among escapes interpreted in PHP double-quoted strings. That sequence represents a newline; a forward slash does not introduce the escape. \r denotes a different line-control character rather than the newline sequence requested. Interpretation depends on string context, since single-quoted strings generally preserve such escapes rather than processing them the same way.
Evidence in the complete study note
In double-quoted PHP strings, backslash-n represents a line feed and backslash-r represents a carriage return.WEB-S06
The written sequences are \n and \r; forward-slash sequences such as /n are ordinary text.WEB-S06
Choice by choice
A · incorrect — \r is the carriage-return escape, a different line-control character from the newline sequence requested.
B · correct — \n is the newline escape sequence recognized in the note’s double-quoted string context.
C · incorrect — A forward slash does not introduce the newline escape, so /r is ordinary text here.
D · incorrect — The newline escape uses a backslash; /n with a forward slash is ordinary text.
Question 97
PHP files can contain ________ code.
A. text
B. HTML
C. python
D. Both A and B
Hint / Module Reference (Where to Read)
Check exact language syntax, declaration rules and execution context before reasoning about the result.
PHP can be embedded within ordinary HTML (p.60); the output examples contain text strings (p.63). Thus text and HTML can coexist in a PHP document. Evidence: PDF p. 60, PDF p. 63.
Evidence in the complete study note
It can emit ordinary text and HTML.WEB23
Choice by choice
A · incorrect — Text can occur, but A alone omits HTML.
B · incorrect — HTML can occur, but B alone omits text.
C · incorrect — The module does not define Python embedding or execution.
D · correct — Combines the supported text and HTML forms.
Question 98
What will be the output of the following PHP code?
<?php
$x = 8;
$y = 8.0;
echo ($x === $y);
?>
A. 8 === 8
B. No Output
C. 1
D. 0
Hint / Module Reference (Where to Read)
Trace the bindings and operations in order; preserve the exact string characters and distinguish returned values from emitted output.
In PHP, 8===8.0 is false because int and float differ, despite equal numeric values. echo false emits an empty string. Consequently the shown code produces no output characters, rather than printing zero. The comparison expression itself is evaluated and is not emitted as source text.
Evidence in the complete study note
PHP 8==8.0 is true, but 8===8.0 is false because types differ; echo false emits an empty string, echo true emits1.WEB24
Choice by choice
A · incorrect — echo evaluates the comparison instead of printing its source expression.
B · correct — Strict identity fails for int versus float, and echo false emits no characters.
C · incorrect — One is the echo representation of true; the strict identity comparison here is false.
D · incorrect — Although the comparison is false, echo false emits an empty string rather than the digit zero.
Question 99
The script that executes at the browser side is called _____
A. Client-side scripting
B. Server-side scripting
C. Both A and B
D. None of the above
Hint / Module Reference (Where to Read)
Identify the role requested and compare it with the definitions and constraints in the cited passages.
The module distinguishes client/browser behavior from server-side PHP. Code executing in the browser is client-side scripting in this model. Evidence: PDF p. 9, PDF p. 60, PDF p. 56.
Evidence in the complete study note
A browser/user agent requests resources and renders HTML/CSS, then runs permitted JavaScript.WEB01
PHP, Python, JSP/Java and ASP.NET applications generate server responses and access databases; C# is commonly used with ASP.NET.WEB01
Choice by choice
A · correct — Browser-side matches client-side.
B · incorrect — PHP server processing happens on the server.
C · incorrect — The stated execution site is the client, not both.
D · incorrect — A matches the documented client/server distinction.
Question 100
How many basic PHP output language constructs are counted when callable output functions such as printf and print_r are excluded?
A. 1
B. 2
C. 3
D. 4
Hint / Module Reference (Where to Read)
Identify the role requested and compare it with the definitions and constraints in the cited passages.
The note identifies echo and print as two basic output constructs. This count is about that language-construct category, rather than every way a PHP program can produce output. Functions such as printf and print_r provide additional output mechanisms but do not increase the specified count of constructs. The revised category therefore supports one numeric choice without implying that PHP has only two output mechanisms altogether.
Evidence in the complete study note
They are two basic output constructs, not the only output mechanisms; printf, print_r and others exist.WEB24
Choice by choice
A · incorrect — Both echo and print belong to the specified category, so one is too few.
B · correct — The category contains the two named basic constructs.
C · incorrect — This would count an additional mechanism outside the specified construct category.
D · incorrect — This would mix other output mechanisms into the restricted category.
Question 101
How many return value does echo statement has?
A. 1
B. 2
C. 3
D. 0
Hint / Module Reference (Where to Read)
Trace the bindings and operations in order; preserve the exact string characters and distinguish returned values from emitted output.
Page 63 contrasts print, which returns a value, with echo, which does not. Thus echo has zero return values; zero here counts return values rather than describing a returned numeric zero. Evidence: PDF p. 63.
Evidence in the complete study note
echo is a language construct with no return value and can emit comma-separated expressions.WEB24
print takes one expression and returns1.WEB24
Choice by choice
A · incorrect — Would give echo the return behavior assigned to print.
B · incorrect — No two return values are described.
C · incorrect — No three return values are described.
D · correct — No return value, expressed as count zero.
Question 102
What exact raw response text does this PHP emit, before any browser HTML rendering?
<?php
echo "Hello world </br> I am learning PHP at letsfindcourse";
?>
A. Hello world
B. Hello world </br> I am learning PHP at letsfindcourse
C. Hello worldI am learning PHP at letsfindcourse
D. Error
Hint / Module Reference (Where to Read)
Trace the bindings and operations in order; preserve the exact string characters and distinguish returned values from emitted output.
Correct answer: B — Hello world </br> I am learning PHP at letsfindcourse
echo emits the characters of its string without automatically adding or removing spaces. Because the question asks for raw response text, the break-like markup remains present exactly as written; browser error recovery is irrelevant to this output. Both phrases and the spaces around the markup are preserved. The HTML fragment’s unusual closing form does not make the surrounding PHP string syntactically invalid.
Evidence in the complete study note
PHP sends markup as response characters; a browser then interprets it.WEB24
print accepts one argument and may be written with or without parentheses (p.63). Both statements print the assigned 5, with no intervening separator, giving 55. Evidence: PDF p. 63, PDF p. 63, PDF p. 64.
Evidence in the complete study note
Two prints of5 emit55; "I"."am" emitsIam.WEB24
The basic print and echo constructs can be written with or without parentheses when their syntax permits it.WEB-S06
Choice by choice
A · incorrect — First output is 5, not zero.
B · correct — Two successive prints of 5 concatenate in output.
C · incorrect — Second output is also 5.
D · incorrect — Both print forms are explicitly permitted.
Question 104
What will be the output of the following PHP code?
<?php
print("I"."am"."learning"."php");
?>
A. Iamlearningphp
B. I am learning php
C. Nothing
D. error
Hint / Module Reference (Where to Read)
Trace the bindings and operations in order; preserve the exact string characters and distinguish returned values from emitted output.
The PHP examples join strings and variables using dot (p.72). Joining I, am, learning and php inserts no spaces, so the resulting single argument is Iamlearningphp and print emits it. Evidence: PDF p. 72, PDF p. 63.
Echo accepts quoted strings, including HTML in generated output, and multiple comma-separated arguments when unparenthesized (p.63). All three snippets meet those forms. Evidence: PDF p. 63, PDF p. 60.
Evidence in the complete study note
echo is a language construct with no return value and can emit comma-separated expressions.WEB24
PHP sends markup as response characters; a browser then interprets it.WEB24
Choice by choice
A · incorrect — Valid string containing heading markup.
B · incorrect — Valid string containing a line-break tag.
C · incorrect — Valid unparenthesized multiple-argument echo.
D · correct — All A-C are valid under the cited echo rules.
Question 106
What will be the output of the following PHP code?
<?php
echo "This is <i>Letsfindcourse</i>";
?>
A. This is Letsfindcourse
B. This is Letsfindcourse(Letsfindcourse in italic)
C. This is
D. Error
Hint / Module Reference (Where to Read)
Trace the bindings and operations in order; preserve the exact string characters and distinguish returned values from emitted output.
Correct answer: B — This is Letsfindcourse(Letsfindcourse in italic)
Echo emits the quoted HTML string (p.63); the i element renders its content in italics (p.15). Consequently the full text is displayed with Letsfindcourse italicized. Evidence: PDF p. 63, PDF p. 15.
Evidence in the complete study note
PHP sends markup as response characters; a browser then interprets it.WEB24
In the browser’s default presentation, an i element typically displays its text in italics.WEB-S07
Choice by choice
A · incorrect — Text is present but this omits the requested formatting distinction.
B · correct — States both the text and italic formatting.
C · incorrect — Incorrectly drops the i element content.
D · incorrect — The quoted string and i tags fit the documented forms.
Question 107
Any variables declared in PHP must begin with a _____?
A. .
B. #
C. &
D. $
Hint / Module Reference (Where to Read)
Check exact language syntax, declaration rules and execution context before reasoning about the result.
After $, identifiers may contain letters, digits and underscores, with no stated fixed short length; both short and descriptive names fit this rule. Names must still satisfy the first-character restriction. Evidence: PDF p. 64.
Evidence in the complete study note
Variables begin with $, then a letter/underscore and subsequent letters/digits/underscores; $AGE18 works but $18AGE does not.WEB23
Choice by choice
A · incorrect — Allowed but not the only allowed length style.
B · incorrect — Allowed but not the only allowed length style.
C · correct — Both comply when characters are valid.
D · incorrect — The naming rule permits both examples of name length.
Question 109
Which characters may start a PHP variable identifier immediately after its mandatory $ sign? Select all that apply.
A. letter
B. underscore
C. A digit
D. A space
Hint / Module Reference (Where to Read)
Check exact language syntax, declaration rules and execution context before reasoning about the result.
Correct answers (select all): A, B — letter; underscore
A PHP variable begins with a dollar sign followed by a letter or underscore. Digits may occur later in the identifier but may not be the first character after the sigil. A space cannot form that initial identifier character either. The question specifies the position being tested and replaces the vague no-numbers and aggregate wording with concrete candidate characters, allowing both valid initial-character classes to be selected.
Evidence in the complete study note
Variables begin with $, then a letter/underscore and subsequent letters/digits/underscores; $AGE18 works but $18AGE does not.WEB23
Choice by choice
A · correct — A letter is allowed immediately after the dollar sign.
B · correct — An underscore is also allowed immediately after the dollar sign.
C · incorrect — A digit may appear later, but cannot start the identifier.
D · incorrect — A space is not an allowed initial identifier character.
Question 110
PHP variables are case-sensitive?
A. True
B. False
C. Only the variable named sum is case-sensitive
D. None of the above
Hint / Module Reference (Where to Read)
Check exact language syntax, declaration rules and execution context before reasoning about the result.
PHP variable names are case-sensitive generally. Two names that differ in letter case can identify different variables, regardless of whether the name is sum or something else. True therefore gives the general rule. False contradicts it, and the sum-only restriction is false because case sensitivity is not limited to that name. None is incorrect because the true general statement is offered.
Evidence in the complete study note
Names are case-sensitive.WEB23
Choice by choice
A · correct — PHP variable names are case-sensitive as a general rule, exactly as WEB23 states.
B · incorrect — False contradicts the explicit case-sensitivity rule for PHP variable names.
C · incorrect — Case sensitivity applies to PHP variable names generally, not only to sum.
D · incorrect — True is offered and matches the note, so None is not applicable.
Question 111
In the common PHP teaching taxonomy that counts persistent function-local storage as an additional category alongside visibility categories, how many variable categories are counted?
A. 2
B. 3
C. 1
D. 4
Hint / Module Reference (Where to Read)
Identify the role requested and compare it with the definitions and constraints in the cited passages.
The stated teaching taxonomy counts local, global and static as three categories. Global and local distinguish visibility, while a static local describes persistence across calls within the execution lifecycle. The question makes this mixed teaching convention explicit rather than treating static storage as an independent visibility scope. Counting only visibility would answer a different question, which is why the narrower numeric choice is now justified.
Evidence in the complete study note
Common “three scopes” teaching counts local, global and static, but state the taxonomy.WEB25
A static local retains its value across calls during the execution lifecycle; static storage is not simply another visibility scope.WEB25
Choice by choice
A · incorrect — Two counts local/global visibility alone and omits the stated static category.
B · correct — The specified teaching taxonomy counts local, global and static.
C · incorrect — One omits the distinctions explicitly included in the taxonomy.
D · incorrect — No fourth category is included in the stated convention.
Question 112
choose the incorrect variable name in php?
A. $_AGE
B. $18AGE
C. $AGE18
D. $_AGE18
Hint / Module Reference (Where to Read)
Check exact language syntax, declaration rules and execution context before reasoning about the result.
PHP variable names may include underscores, letters and digits, but the first character after $ cannot be numeric (p.64). Only $18AGE violates that rule. Evidence: PDF p. 64.
Evidence in the complete study note
Variables begin with $, then a letter/underscore and subsequent letters/digits/underscores; $AGE18 works but $18AGE does not.WEB23
Choice by choice
A · incorrect — Underscore then letters is permitted.
B · correct — Starts with digit 1 after $, expressly forbidden.
C · incorrect — Letter start and later digits are permitted.
D · incorrect — Underscore start and later digits are permitted.
Question 113
A variable declared _____ has a GLOBAL SCOPE?
A. outside program
B. inside function
C. outside function
D. None of the Above
Hint / Module Reference (Where to Read)
Identify the role requested and compare it with the definitions and constraints in the cited passages.
WEB25 directly states that a variable outside a function has global scope. A function’s own locals and by-value parameters are separate bindings; functions must explicitly refer to globals through global or $GLOBALS when needed. Outside program is not a declaration location, and inside function describes the ordinary local-binding setting rather than the requested global one.
Evidence in the complete study note
A variable outside a function has global scope.WEB25
A function’s locals and by-value parameters are separate bindings; use global $x or $GLOBALS["x"] to refer to a global explicitly.WEB25
Choice by choice
A · incorrect — Outside program is not a meaningful place for a declaration within the executing PHP source.
B · incorrect — Ordinary variables declared inside a function are local to that function, not automatically global.
C · correct — A declaration outside a function creates a global binding under the rule given in WEB25.
D · incorrect — Outside function is explicitly offered and matches the global-scope rule.
Question 114
Which of the following will be output of the following code?
<?php
function myTest() {
static $x;
echo $x;
}
myTest();
?>
A. 0
B. 1
C. No Output
D. Error
Hint / Module Reference (Where to Read)
Trace the bindings and operations in order; preserve the exact string characters and distinguish returned values from emitted output.
WEB25 states that an uninitialized static local begins as null and echo emits no characters for it. The function declares static $x but never assigns or increments it, then echoes that null value on its only call. The source is valid, so neither an error nor an assumed numeric initialization is the supported result.
Evidence in the complete study note
An uninitialized static local begins as null, so echo emits no characters.WEB25
Choice by choice
A · incorrect — The uninitialized static local begins as null; echo does not print an assumed numeric zero.
B · incorrect — No assignment or increment produces one anywhere in the function.
C · correct — Echoing the initial null static local emits no output characters.
D · incorrect — Declaring an uninitialized static local is valid PHP and does not itself produce an error.
Question 115
Which of the following is NOT a super global variable ?
A. $_SERVER
B. $_GLOBAL
C. $_GET
D. $_POST
Hint / Module Reference (Where to Read)
Identify the data source or security responsibility precisely, and check whether a combined source or a different control could also qualify.
The predefined list includes $_SERVER, $_GET and $_POST, while the global map is $GLOBALS, not $_GLOBAL. B confuses its spelling and is not the listed superglobal. Evidence: PDF p. 62.
Evidence in the complete study note
$GLOBALS is the actual global-symbol array; $_GLOBAL is not the built-in name.WEB27
$_GET contains query parameters; $_POST contains supported form POST data; $_FILES upload metadata; $_SERVER request/environment details; $_COOKIE cookie values; $_SESSION session data after startup.WEB27
Choice by choice
A · incorrect — Explicitly listed.
B · correct — Wrong spelling for $GLOBALS; not the module superglobal.
C · incorrect — Explicitly listed.
D · incorrect — Explicitly listed.
Question 116
Predict the output of the following code snippet :
<?php
$i=10;
function sample($i)
{
$i++;
echo $i.",";
}
echo $i.",";
GLOBAL $i;
sample($i);
echo $i;
?>
A. 11,11,11
B. 10,11,11
C. 10,11,10
D. 10,10,10
Hint / Module Reference (Where to Read)
Trace the bindings and operations in order; preserve the exact string characters and distinguish returned values from emitted output.
WEB25 traces this exact pattern: the initial global print emits 10, the function increments its local by-value parameter to 11, and the caller remains 10 afterward. The source writes commas after the first two values. A top-level GLOBAL statement does not turn the function’s parameter into a reference, so the final output is 10,11,10.
Evidence in the complete study note
If global $i=10 and sample($i) increments/prints its by-value parameter, the caller’s $i stays10.WEB25
A global statement outside the function does not turn its value parameter into a reference.WEB25
Choice by choice
A · incorrect — The first print occurs before any increment and therefore emits ten rather than eleven.
B · incorrect — The function increments a by-value local parameter, so the final caller value remains ten.
C · correct — The caller prints ten, the local parameter prints eleven, and the unchanged caller prints ten.
D · incorrect — The function does increment its local parameter, so the middle output is eleven rather than ten.
Question 117
Can we change the value of constant during the execution of the script.
A. can
B. can not
C. depends on data type
D. depends on variable
Hint / Module Reference (Where to Read)
Check exact language syntax, declaration rules and execution context before reasoning about the result.
Correct answer: B — Cannot redefine the constant during ordinary script execution.
WEB23 says constants cannot normally be redefined during execution. That immutability is the property being tested, rather than whether a variable can receive another value. The offered data-type and variable-dependent alternatives do not override the constant binding rule. Therefore can not is the appropriate general answer in the note’s PHP context.
Evidence in the complete study note
Constants cannot normally be redefined during execution.WEB23
Choice by choice
A · incorrect — Ordinary constant bindings cannot be reassigned as variables can during script execution.
B · correct — The note explicitly says constants cannot normally be redefined during execution.
C · incorrect — The redefinition restriction is a binding rule rather than a choice determined by the constant’s data type.
D · incorrect — A constant’s ordinary redefinition rule does not depend on the value of some variable.
Question 118
The element is used to contain characters that should be superscript.
A. a | <sup> v
B. i? <sub> x
C. /@| <ins> x
D. | None of the above x
Hint / Module Reference (Where to Read)
Use the element or attribute meaning and document structure, rather than appearance or a similar-looking name.
Page 16 pairs sub with subscript and sup with superscript. Ignoring the source annotation debris around options, A contains the required sup tag. Evidence: PDF p. 16.
Evidence in the complete study note
<sub>/<sup> mark sub/superscripts.WEB06
Choice by choice
A · correct — Contains the documented superscript tag.
B · incorrect — sub is subscript.
C · incorrect — ins is not the documented superscript form.
D · incorrect — A provides the required element.
Question 119
You can add a horizontal rule between sections using tag of
A. a | <br> x
B. i? <hr> v
C. '@| All of the above ><
D. | None of the above x
Hint / Module Reference (Where to Read)
Use the element or attribute meaning and document structure, rather than appearance or a similar-looking name.
The horizontal-rule section explicitly gives <hr>. A br instead inserts a line break, so the all-of-above alternative fails. Evidence: PDF p. 16, PDF p. 15.
Evidence in the complete study note
<p> marks paragraphs; <br> is a line break and <hr> a thematic break.WEB06
Choice by choice
A · incorrect — br is a text line break.
B · correct — hr is the horizontal rule.
C · incorrect — Not all: br is a different operation.
D · incorrect — B supplies the documented tag.
Question 120
An ordered list is created with:
A. <ol>
B. <ul>
C. <li>
D. None of the above
Hint / Module Reference (Where to Read)
Use the element or attribute meaning and document structure, rather than appearance or a similar-looking name.
The meta section defines meta elements as structured metadata about a web page. head contains metadata elements but is the broader container; title supplies only a title, body the visible content. Evidence: PDF p. 13, PDF p. 12.
Evidence in the complete study note
Meta charset declares encoding; description summarizes the page; viewport controls mobile viewport behavior.WEB06
<!DOCTYPE html> selects modern standards mode; <html> is the document root, <head> holds metadata, and <body> contains document content.WEB06
<title> supplies the page/tab title.WEB06
Choice by choice
A · incorrect — Broader container, not the metadata element requested.
B · correct — Exact metadata element.
C · incorrect — Only supplies page title.
D · incorrect — Contains visible page content.
Question 123
Which of the following is used to add styles and formatting to a webpage in
CSS?
A. Functions
B. Variables
C. Selectors
D. Arrays
Hint / Module Reference (Where to Read)
Identify which elements a rule targets and distinguish selector syntax from declaration syntax.
A selector identifies the elements to be styled and its declaration block supplies the styles (p.29). C is the listed mechanism for attaching styling rules to webpage elements. Evidence: PDF p. 29.
Evidence in the complete study note
A rule is selector { property: value; }.WEB11
A selector chooses where declarations apply; it is not itself the property that sets a color.WEB11
Choice by choice
A · incorrect — Functions are not the ruleset component selecting elements.
B · incorrect — Variables are not the selecting component described.
C · correct — Selectors identify the targets of CSS rules.
D · incorrect — Arrays are not a CSS rule component here.
Question 124
Using PHP8 standard database extensions, which snippet can issue the shown SELECT against MySQL? Assume $pdo is an initialized PDO connection using the MySQL driver, $conn is an initialized MySQLi connection, and the users table exists.
A. $result = mysql_query("SELECT * FROM users WHERE id = 1");
B. $result=mysqliquery(conn, "SELECT * FROM users WHERE id = 1");
C. $result = $pdo->query("SELECT * FROM users WHERE id = 1");
D. $result = pg_query("SELECT * FROM users WHERE id = 1");
Hint / Module Reference (Where to Read)
Identify the API and operation first, then distinguish connection setup, statement execution and result processing.
Correct answer: C — $result = $pdo->query("SELECT * FROM users WHERE id = 1");
With the stated MySQL PDO connection, $pdo->query executes the SELECT and returns its statement object, so C is valid. The old mysql_* extension is removed in PHP8. B misspells mysqli_query and omits the dollar prefix on its connection variable. pg_query belongs to the PostgreSQL extension and does not execute through either stated MySQL connection.
Evidence in the complete study note
PHP8 uses MySQLi or PDO; the old mysql_* extension was removed, so migrate older snippets to a supported API.WEB31
With an initialized PDO connection, $pdo->query($sql) executes an SQL statement without placeholders and returns a PDOStatement for processing its results.WEB-S04
The procedural MySQLi query form is mysqli_query($conn, $sql), using a MySQLi connection and the correctly spelled function name.WEB-S04
The pg_query function belongs to PHP’s PostgreSQL extension; it is not a MySQL connection API.WEB-S04
Choice by choice
A · incorrect — mysql_query belongs to the removed mysql_* extension and is not a PHP8 standard MySQL call.
B · incorrect — The procedural spelling is mysqli_query($conn, ...); the offered name and bare conn do not form that call.
C · correct — The initialized MySQL-driver PDO connection can execute this SELECT through its query method.
D · incorrect — pg_query belongs to the PostgreSQL extension rather than the stated MySQL connections.
Question 125
Assume document.body exists and element is a newly created, detached div. Which snippet inserts that element into the document body?
A. element.appendChild(document.createTextNode("Hello, world!"));
B. var element = document.createElement("div");
C. document.body.appendChild(element);
D. document.getElementByld("container").appendChild(element);
Hint / Module Reference (Where to Read)
Track which node is selected or created, and distinguish changing content from attaching a node.
Correct answer: C — document.body.appendChild(element);
Creating a DOM element and inserting it are separate steps. The question supplies the already-created detached div, so appendChild on document.body performs the required insertion. Creating another div would leave it detached, and appending a text node changes the contents of an existing element rather than inserting that element into the body. The final choice retains the incorrect lookup spelling, which fails instead of providing the required insertion.
Evidence in the complete study note
Creation alone does not insert it.WEB20
createTextNode makes text; appendChild attaches an existing node.WEB20
getElementByld with a lowercase l replacing I is a different, nonexistent method.WEB20
Choice by choice
A · incorrect — This adds a text node inside element, leaving element detached.
B · incorrect — This creates another detached div rather than inserting it.
C · correct — This attaches the supplied div to the existing document body.
D · incorrect — getElementByld is misspelled and is not the documented lookup method.
Question 126
Which of the following is used to include an external JavaScript file in an
HTML document?
A. <script href="file.js"></script>
B. <link rel="stylesheet" href="file.js">
C. <script type="text/javascript" src="file.js"></script>
D. <link rel="stylesheet" type="text/javascript" href="file.js">
Hint / Module Reference (Where to Read)
Identify which elements a rule targets and distinguish selector syntax from declaration syntax.
Correct answer: C — <script type="text/javascript" src="file.js"></script>
The module external-file syntax uses a script element with src pointing to script.js. C uses this structure; stylesheet link elements do not load executable script in that example. Evidence: PDF p. 45, PDF p. 29.
Evidence in the complete study note
Use <script src="app.js"></script> for an external .js file; script content has no HTML closing-tag syntax inside its JavaScript source.WEB15
An external sheet uses <link rel="stylesheet" href="styles.css"> in head; an internal sheet uses style; an inline declaration uses an element’s style attribute.WEB11
Choice by choice
A · incorrect — href is not the script source attribute shown.
B · incorrect — Links as stylesheet instead of script.
C · correct — Uses script and src as required.
D · incorrect — Still links as a stylesheet rather than script.
Question 127
Which of the following is used to define the structure of a webpage in HTML?
A. Tags
B. Classes
C. IDs
D. Styles
Hint / Module Reference (Where to Read)
Identify which elements a rule targets and distinguish selector syntax from declaration syntax.
HTML tags delimit elements that establish content structure (pp.10-11). Classes and IDs identify elements, while styles concern presentation. Evidence: PDF p. 10, PDF p. 11.
Evidence in the complete study note
Tags mark boundaries; an element includes content and attributes, or is a void element such as img.WEB06
Type p selects paragraph elements, .notice selects a class, #logo an ID, h1,h2 groups selectors, nav ul selects descendants and nav>ul direct children.WEB11
Choice by choice
A · correct — Tags form structural elements.
B · incorrect — Identifiers do not replace structural tags.
C · incorrect — Unique identifiers do not replace structural tags.
D · incorrect — Presentation rather than the HTML structural mechanism.
Question 128
Which PHP mechanisms can participate in generating dynamic content and server-side processing? Select all that apply.
A. Functions
B. Variables
C. Classes
D. Objects
Hint / Module Reference (Where to Read)
Identify the role requested and compare it with the definitions and constraints in the cited passages.
Correct answers (select all): A, B, C, D — Functions; Variables; Classes; Objects
Dynamic PHP responses can combine values, reusable behavior and object-based structures. Variables hold incoming or computed data; functions carry out processing; classes define application state and behavior; objects are instances used by that logic. None of these mechanisms alone defines dynamic PHP, but each can participate in it. The revised wording therefore asks for all contributors rather than forcing one exclusive mechanism from four compatible choices.
Evidence in the complete study note
A function can receive arguments, return a value, or produce output; classes/objects/variables also support server processing, so no single one of these mechanisms alone defines “dynamic PHP.” Use braces to make nesting explicit.WEB26
A class defines properties/methods; new creates an object, $obj->field accesses a property, and $obj->method() calls a method.WEB33
Choice by choice
A · correct — Functions can process inputs and return values or produce output.
B · correct — Variables hold request data and computed values used in a response.
C · correct — Classes define state and behavior for server application logic.
D · correct — Objects instantiate classes and can participate in generating responses.
Question 129
Which of these JavaScript libraries, frameworks or platforms can contribute to interactive web interfaces when combined with suitable responsive layout and styling? Select all that apply.
A. jQuery
B. React
C. Angular
D. Vue.js
Hint / Module Reference (Where to Read)
Match the stated application requirement to the capabilities and category of each technology.
Correct answers (select all): A, B, C, D — jQuery; React; Angular; Vue.js
jQuery supports DOM operations, React builds component interfaces, and Angular and Vue also support interactive interfaces. Their categories differ, but the revised question includes libraries, frameworks and platforms rather than treating those terms as exclusive. Responsive behavior additionally requires appropriate layout and styling; it is not guaranteed by choosing one name. Each listed technology can contribute under that condition, so all four choices are valid.
Evidence in the complete study note
jQuery simplifies DOM operations; React builds component interfaces; Angular is a component platform, distinct from older AngularJS; Vue also builds interactive interfaces.WEB38
Each can contribute to a responsive interface, so those generic descriptions do not identify one unique framework.WEB38
Choice by choice
A · correct — jQuery can provide DOM interaction while layout rules handle responsive presentation.
B · correct — React components can implement interactive interfaces with responsive styles.
C · correct — Angular supplies component-based application capabilities.
D · correct — Vue can build interactive interfaces and use responsive layout styles.
Question 130
Which snippet applies a one-column card layout only when the viewport is at most 600 CSS pixels wide?
The required behavior depends on viewport width, so the rule must contain the appropriate media condition and a concrete layout declaration. max-width:600px applies at or below that width, and the single 1fr track makes the card grid one column. A plain flex declaration does not express this breakpoint or column requirement. Rotation and background color affect appearance without implementing the requested conditional layout.
Evidence in the complete study note
Responsive design combines flexible layout, images, viewport metadata and media queries, for example @media(max-width:600px){.cards{grid-template-columns:1fr}}.WEB14
Grid organizes rows and columns with explicit tracks, such as grid-template-columns:1fr 2fr.WEB14
Choice by choice
A · correct — The media condition and one-track declaration implement the stated breakpoint behavior.
B · incorrect — This does not specify the requested viewport condition or card-grid track count.
C · incorrect — Rotation does not create the conditional one-column layout.
D · incorrect — A background color does not alter the grid at the required breakpoint.
Question 131
Which of the following is used to store user data on the server-side in web
applications?
A. Cookies
B. Sessions
C. Local storage
D. IndexedDB
Hint / Module Reference (Where to Read)
Follow the identifier and server-side state through the stated lifecycle or access check; distinguish client-controlled claims from server decisions.
In conventional server-backed sessions, the browser normally keeps an opaque identifier and the user’s session data resides in server-controlled storage. Cookies, localStorage and IndexedDB instead retain data on the client side. Client storage may participate in an application design, but it is not the server-side session-data store requested. Sessions therefore match the stated location.
Evidence in the complete study note
Normally the browser holds an opaque session identifier while data resides in server-controlled storage.WEB29
Cookies are browser-held name/value data automatically attached to matching requests subject to domain, path, expiry, Secure and SameSite rules.WEB28
localStorage persists origin-specific string values across sessions until removed/cleared; sessionStorage is scoped to a page session/tab.WEB28
IndexedDB supplies structured local storage.WEB28
Choice by choice
A · incorrect — Cookies hold browser-side values; a session cookie normally carries an identifier rather than the server’s session-data store.
B · correct — A server-backed session keeps the user’s session data in server-controlled storage.
C · incorrect — localStorage retains origin-specific strings in browser storage rather than storing the server’s session data.
D · incorrect — IndexedDB is structured local browser storage rather than the server’s session-data store.
Question 132
Identify the function in JavaScript which is used to send messages to users requesting for text input?
A. getInput()
B. alert()
C. prompt ()
D. display()
Hint / Module Reference (Where to Read)
Distinguish the browser object or dialog role from the kind of response it collects.
Prompt displays a modal asking for text input; alert is an informational popup. C names the documented text-input operation. Evidence: PDF p. 46, PDF p. 47.
Evidence in the complete study note
alert displays information, confirm returns a Boolean, and prompt requests text or returns null on cancellation.WEB22
Alert is a notification; confirm additionally asks for an OK/Cancel decision, while prompt additionally offers a text field.WEB-S03
Choice by choice
A · incorrect — Not the documented input function.
B · incorrect — Informational popup, not text entry.
C · correct — Exact text-input function.
D · incorrect — Not the documented input function.
Question 133
In HTML, which attribute is used to create a link that opens in a new window tab?
A. src="_blank"
B. target="_self"
C. target="_blank"
D. src="_self"
Hint / Module Reference (Where to Read)
Use the element or attribute meaning and document structure, rather than appearance or a similar-looking name.
WEB07 says _blank targets a new browsing context, while _self uses the current one. Therefore target="_blank" is the offered attribute-value pair for a new tab or window. Browser preferences determine whether the new context appears as a tab or window, so the markup does not force that UI distinction. src does not select a link target context.
Evidence in the complete study note
target="_self" uses the current context, _blank a new context, _parent its parent and _top the top-level context.WEB07
Browser preferences determine tab versus window.WEB07
Choice by choice
A · incorrect — src does not select the browsing context where an anchor link is opened.
B · incorrect — The _self target uses the current context rather than requesting a new one.
C · correct — The _blank target requests a new context; browser preferences decide whether that is a tab or window.
D · incorrect — src is not the target attribute, and _self would indicate the current context anyway.
Question 134
In which HTML element, we put the JavaScript code using?
A. <javascript>...</javascript>
B. <script>...</script>
C. <js>...</js>
D. <css>...</css>
Hint / Module Reference (Where to Read)
Check exact language syntax, declaration rules and execution context before reasoning about the result.
Page 45 encloses JavaScript between script and /script. None of the invented javascript, js or css element names matches that example. Evidence: PDF p. 45.
Evidence in the complete study note
Use <script src="app.js"></script> for an external .js file; script content has no HTML closing-tag syntax inside its JavaScript source.WEB15
Choice by choice
A · incorrect — Not the shown element.
B · correct — Exact enclosing element.
C · incorrect — Not the shown element.
D · incorrect — CSS is presentation and this is not the script element.
Question 135
Which of the following CSS style property is used to specify an italic text?
A. font-weight
B. font-family
C. font-size
D. font-style
Hint / Module Reference (Where to Read)
Identify the requested presentation effect and layout context before matching the property or rule.
The font property list distinguishes font-style, font-weight, font-family and font-size; its example uses italic (pp.34-35). The style component corresponds to italic, rather than weight, family or size. Evidence: PDF p. 34, PDF p. 35.
Evidence in the complete study note
color sets text color; background-color sets background; font-size size, font-family face, font-style italic, font-weight weight, text-align inline-content alignment, and text-decoration effects such as underline.WEB13
Choice by choice
A · incorrect — Weight concerns heaviness, not the style component named in the list.
B · incorrect — Family names the typeface, not italic style.
C · incorrect — Size sets dimensions rather than italic style.
D · correct — Style is the named italic-related font component.
Question 136
Which of the following function is used to create a session?
A. isset()
B. $_SESSION()
C. session_destroy()
D. session_start()
Hint / Module Reference (Where to Read)
Follow the identifier and server-side state through the stated lifecycle or access check; distinguish client-controlled claims from server decisions.
The Starting a PHP Session example calls session_start() before storing data. $_SESSION stores data; session_destroy removes it; isset tests presence. Evidence: PDF p. 76, PDF p. 77, PDF p. 73.
Evidence in the complete study note
session_start() starts/resumes PHP session handling and makes $_SESSION available.WEB29
session_destroy() removes the data associated with the current PHP session.WEB-S09
isset tests existence and non-null, not truth or valid syntax.WEB27
Choice by choice
A · incorrect — Presence test, not startup.
B · incorrect — SESSION is the storage array, not initializer function.
C · incorrect — Destroys instead of starting.
D · correct — Exact session startup function.
Question 137
Which of the following is the correct output for the following JavaScript code:
function check(option) {
return(option ? "true" : "false");
}
bool ans=true;
console.log(check(ans));
A. false
B. Runtime Error
C. true
D. Compilation Error
Hint / Module Reference (Where to Read)
Track the value and type at each operation, applying the stated conversion, indexing or mathematical rule.
Correct answer: D — Parse-time syntax error, described by the option as Compilation Error.
WEB19 explicitly states that bool ans=true is not a JavaScript declaration. Parsing fails before check(ans) is called, so neither string result is logged. Replacing bool with let would make the conditional return "true", but that is a different program. D is the closest offered category for the source’s parse-time failure rather than a runtime exception.
Evidence in the complete study note
bool ans=true is not JavaScript declaration syntax; use let ans=true.WEB19
A syntax error prevents source from being parsed successfully.WEB-S05
A condition ? x : y chooses one branch.WEB17
Choice by choice
A · incorrect — The conditional function is never executed because the declaration prevents successful parsing.
B · incorrect — The failure occurs during parsing, before a running program could raise a runtime error.
C · incorrect — true would follow only after repairing bool to a valid JavaScript declaration keyword.
D · correct — Compilation Error is the offered label closest to the actual parse-time SyntaxError.
Question 138
What makes AJAX unique?
A. It works the same with all web browsers
B. It works as a stand-alone web-development tool
C. It uses C++ as its programming language
D. It makes data requests asynchronously
Hint / Module Reference (Where to Read)
Identify the execution side and communication pattern, keeping runtime, transport, data format and callback roles distinct.
Correct answer: D — It makes data requests asynchronously
AJAX is expressly asynchronous and exchanges data with the server without refreshing the page. It combines XML, HTML, CSS and JavaScript rather than being a standalone language/tool. Evidence: PDF p. 89.
Evidence in the complete study note
AJAX means Asynchronous JavaScript and XML, but responses can be JSON, text, HTML or XML.WEB34
It is a technique, not a language, standalone framework or mandatory XML protocol.WEB34
Open standards do not guarantee identical support for every feature in every browser.WEB02
Choice by choice
A · incorrect — All-browser identity is not the stated distinguishing feature.
B · incorrect — Contradicts use of several cooperating technologies.
C · incorrect — The documented scripting language is JavaScript, not C++.
D · correct — Exact asynchronous-request distinction.
Question 139
Which of the following attribute is used for merging two or more adjacent columns?
A. COLSPAN
B. CELLPADDING
C. CELLSPACING
D. ROWSPAN
Hint / Module Reference (Where to Read)
Use the element or attribute meaning and document structure, rather than appearance or a similar-looking name.
The module ID selector example targets a specific element, whereas type and class selectors can target groups. C matches the unique identifier requirement. Evidence: PDF p. 31.
Evidence in the complete study note
Type p selects paragraph elements, .notice selects a class, #logo an ID, h1,h2 groups selectors, nav ul selects descendants and nav>ul direct children.WEB11
Attributes belong in opening tags, with unique IDs when used for document identification.WEB07
Choice by choice
A · incorrect — Class selection can group elements.
B · incorrect — Type selection applies to all elements of that type.
C · correct — ID selects the particular identified element.
D · incorrect — Name is not the unique ID selector described.
Question 141
Which statement about ordinary JavaScript functions and identifiers is true?
A. Function names can contain spaces
B. Function names are not case-sensitive
C. Functions can be passed to and stored by other code like other values
D. Function names can begin with digits
Hint / Module Reference (Where to Read)
Check exact language syntax, declaration rules and execution context before reasoning about the result.
Correct answer: C — Functions can be passed to and stored by other code like other values
JavaScript functions are values that can be passed as arguments or stored for later use. Identifier rules still apply to ordinary function names: names are case-sensitive, cannot contain spaces and cannot begin with a digit. The true choice tests a supported function property instead of making an unrestricted claim about the number of parameters. Runtime argument limits therefore do not affect the correctness of this version.
Evidence in the complete study note
Identifiers are case-sensitive and may start with letters, underscore or $, not digits or spaces.WEB15
function f(x){return x*2;} has a parameter and returns a value; functions can be passed/stored like other values.WEB19
Choice by choice
A · incorrect — Spaces are not permitted inside an ordinary function identifier.
B · incorrect — Identifier names are case-sensitive.
C · correct — Functions can be stored and passed as values.
D · incorrect — An ordinary function identifier cannot start with a digit.
Question 142
Look at the following PHP line: $list = array(20, 12, 23, 19, 18); What is the index of data value
19?
A. 2
B. 0
C. 3
D. 1
Hint / Module Reference (Where to Read)
Identify the role requested and compare it with the definitions and constraints in the cited passages.
PHP numeric array examples start at index zero. In the ordered list, 20 is index 0, 12 is 1, 23 is 2, 19 is 3 and 18 is 4. Evidence: PDF p. 69, PDF p. 70.
Evidence in the complete study note
Numeric arrays start at index0 unless keys are supplied: [20,12,23,19,18] has19 at index3.WEB26
Choice by choice
A · incorrect — Index 2 holds 23.
B · incorrect — Index 0 holds 20.
C · correct — Index 3 holds 19.
D · incorrect — Index 1 holds 12.
Question 143
Which option is a complete, valid PHP variable-assignment statement inside an open PHP block? No closing PHP tag follows the option to supply an implicit terminator.
A. $test = 9.5
B. $test = "This is 'Computer science'";
C. $test = "Computer;
D. test = 5;
Hint / Module Reference (Where to Read)
Check exact language syntax, declaration rules and execution context before reasoning about the result.
Correct answer: B — $test = "This is 'Computer science'";
The balanced double-quoted assignment is complete: it has a dollar-prefixed variable, a matching closing quote and a semicolon. Single quotes inside double quotes are ordinary string characters. The numeric assignment lacks its required semicolon in the stated context, another option has an unterminated string, and the bare test name is not a PHP variable.
Evidence in the complete study note
Variables begin with $, then a letter/underscore and subsequent letters/digits/underscores; $AGE18 works but $18AGE does not.WEB23
A complete ordinary PHP assignment statement ends with a semicolon.WEB-S06
A string’s closing delimiter must match its opening delimiter; a single quote can appear inside a double-quoted string without ending it.WEB-S06
Choice by choice
A · incorrect — This is an assignment expression but lacks the semicolon required for a complete statement in the stated context.
B · correct — The variable name, balanced double quotes and terminating semicolon make a complete assignment.
C · incorrect — The opening double quote has no matching closing delimiter.
D · incorrect — A PHP variable must have its dollar prefix; bare test does not name that variable.
Question 144
Which one of the following is the smallest heading tag?
A. <H6>
B. <H3>
C. <H4>
D. <H1>
Hint / Module Reference (Where to Read)
Use the element or attribute meaning and document structure, rather than appearance or a similar-looking name.
The module explicitly calls h1 largest and h6 smallest among the default heading formats. A therefore identifies the smallest default heading. Evidence: PDF p. 15.
Evidence in the complete study note
Heading levels h1–h6 express hierarchy, with h6 conventionally smallest in default styling, not a mandatory CSS size.WEB06
Choice by choice
A · correct — h6 is explicitly smallest.
B · incorrect — h3 is not the smallest.
C · incorrect — h4 is not the smallest.
D · incorrect — h1 is explicitly largest.
Question 145
In PHP 8 with short_open_tag enabled, which shown delimiters do NOT open and close PHP code? Select all that apply.
A. <? .............. ?>
B. <caption> .............. </caption>
C. <script language="PHP"> .............. </script>
D. <?php .............. ?>
Hint / Module Reference (Where to Read)
Check exact language syntax, declaration rules and execution context before reasoning about the result.
The full <?php form is valid, and the stated configuration also permits the short <? form. A caption element is HTML markup rather than a PHP delimiter. The historical script-language form is no longer accepted in PHP 8, so it is another non-delimiter under this version. Specifying both version and short-tag configuration makes B and C definite selections rather than relying on an unstated historical environment.
Evidence in the complete study note
Use <?php ...WEB23
PHP8 no longer accepts historical <script language="PHP"> delimiters; short <? depends on configuration, so use the full form.WEB23
Choice by choice
A · incorrect — The explicitly enabled short-tag configuration makes this PHP delimiter valid.
B · correct — caption is HTML markup, not a PHP code delimiter.
C · correct — PHP 8 does not accept this historical script-language delimiter.
D · incorrect — The full PHP opening and closing form is valid.
Question 146
Which statements about Java and JavaScript are true? Select all that apply.
A. Both are object oriented languages
B. JavaScript and Java are the same programming language
C. Javascript can be used in extremely sophisticated applications
D. JavaScript function identifiers are not case-sensitive
Hint / Module Reference (Where to Read)
Check exact language syntax, declaration rules and execution context before reasoning about the result.
Correct answers (select all): A, C — Both are object oriented languages; Javascript can be used in extremely sophisticated applications
Java supports class-based object-oriented programming, while JavaScript supports prototype-based objects; both therefore support object-oriented programming. The Java classification is supplied by the supplementary Oracle tutorial, while the note supplies JavaScript’s object model, its distinction from Java and its ability to support sophisticated applications. The languages are not identical, and JavaScript identifiers remain case-sensitive. Thus both the object-oriented statement and the sophisticated-application capability are true.
Evidence in the complete study note
Java organizes object-oriented programs using classes, objects, inheritance and interfaces.WEB-S01
JavaScript originated at Netscape; it is distinct from Java and supports sophisticated applications through prototype-based objects and first-class functions.WEB15
Identifiers are case-sensitive and may start with letters, underscore or $, not digits or spaces.WEB15
Additional authoritative reference
Oracle teaches Java in terms of objects, classes, inheritance and interfaces, establishing its object-oriented programming model; the supplied Web note covers the JavaScript side.
Correct answer: D — Frames allow parts of the page to remain stationary while other parts scroll
A legacy frameset divides a window into separate documents, and individual frame views can scroll independently. One frame can therefore remain stationary while another scrolls. The documents need not be identical, and the old frameset document used frameset in place of body. The noframes fallback addresses browsers without frame support, so support cannot be asserted for all browsers.
Evidence in the complete study note
Legacy frameset/frame divides a window into separate documents; frameset replaced body in old frameset documents.WEB10
Named targets controlled which frame changed; independent scrolling could leave other frames stationary.WEB10
A legacy frameset document could include noframes content for user agents that did not support frames or were configured not to display them.WEB-S07
Choice by choice
A · incorrect — Separate frames can display different documents; identical content is not required.
B · incorrect — The old frameset document replaced body with frameset, the reverse of this claim.
C · incorrect — The noframes fallback exists for browsers without frame support, so universal support is false.
D · correct — Independent scrolling lets one frame remain visible while another view scrolls.
Question 148
What will be the output of the following JavaScript statement? Math.floor(5.9)
A. 9
B. 11.8
C. 6
D. 5
Hint / Module Reference (Where to Read)
Track the value and type at each operation, applying the stated conversion, indexing or mathematical rule.
WEB18 directly evaluates Math.floor(5.9)=5. The floor operation gives the greatest integer not exceeding the input, rather than rounding to the nearest integer or multiplying the input. Thus the fractional part does not push the result up to six; the expression value is five. No string or DOM behavior changes this math result.
Evidence in the complete study note
For finite numeric arguments, Math.abs(x) gives the nonnegative magnitude, Math.floor(x) gives the greatest integer no larger than x, and Math.sqrt(x) gives the nonnegative square root for nonnegative x.WEB-S08
Choice by choice
A · incorrect — Nine is not the integer floor of 5.9; it is merely a digit appearing in the input.
B · incorrect — 11.8 doubles the input and is unrelated to the floor operation.
C · incorrect — Six would be upward or nearest-integer rounding here, not floor.
D · correct — Five is the greatest integer no larger than 5.9, matching the explicit note example.
Question 149
What will be the output of the following JavaScript statement? Math.sqrt(36)
A. 6
B. 30
C. 1
D. 36
Hint / Module Reference (Where to Read)
Track the value and type at each operation, applying the stated conversion, indexing or mathematical rule.
WEB18 explicitly states Math.sqrt(36)=6. Six squared gives thirty-six, and this function returns the nonnegative square root rather than the original operand or an arithmetic difference. The expression is already a valid numeric function call and needs no parsing repair or context-dependent type coercion to obtain the stated result.
Evidence in the complete study note
For finite numeric arguments, Math.abs(x) gives the nonnegative magnitude, Math.floor(x) gives the greatest integer no larger than x, and Math.sqrt(x) gives the nonnegative square root for nonnegative x.WEB-S08
Choice by choice
A · correct — Six is the nonnegative square root of thirty-six, exactly as WEB18 evaluates it.
B · incorrect — Thirty is not a square root of thirty-six and does not match the defined function.
C · incorrect — One squared is one, not thirty-six, so it cannot be the result.
D · incorrect — Thirty-six is the input; sqrt does not simply return it unchanged.
Question 150
How are the objects organized in the HTML DOM?
A. Hierarchy
B. Queue
C. Stack
D. Class-wise
Hint / Module Reference (Where to Read)
Track which node is selected or created, and distinguish changing content from attaching a node.
The module describes a document tree with parent elements and descendants (p.31), and DOM nodes/objects representing document structure (p.52). These relations form a hierarchy rather than a queue, stack or class grouping. Evidence: PDF p. 31, PDF p. 52.
Evidence in the complete study note
The DOM is a hierarchy of nodes representing the document.WEB20
Choice by choice
A · correct — Tree parent/descendant structure is hierarchical.
B · incorrect — No FIFO sequence is stated as the document organization.
C · incorrect — No LIFO sequence is stated as the document organization.
D · incorrect — Class selectors group matches, not the document parent/child structure.
Question 151
Which of the following methods can be used to refresh a webpage?
A. location.relocate
B. window.relocate
C. window.refresh
D. location.reload
Hint / Module Reference (Where to Read)
Distinguish the browser object or dialog role from the kind of response it collects.
WEB22 explicitly says location.reload() reloads the current page. D names that method; it must be called with parentheses to perform the reload. The other alternatives invent relocate or refresh names not identified as the standard method in the note. This operation acts on the current browsing location rather than creating a new page context.
Evidence in the complete study note
location.reload() reloads the current page.WEB22
Choice by choice
A · incorrect — location.relocate is not the reload method identified in the browser API rule.
B · incorrect — window.relocate is not the reload method given in WEB22.
C · incorrect — window.refresh is not the standard reload method described by the supplied note.
D · correct — Calling location.reload() reloads the current page; the option names that method.
Question 152
Which one of the following is a false statement?
A. Aweb browser is software that runs on a server
B. Awebsite is a collection of resources in various forms
C. Aweb page is the basic unit of information storage on the www
D. Auser agent renders resources for a user to view
Hint / Module Reference (Where to Read)
Identify the role requested and compare it with the definitions and constraints in the cited passages.
Correct answer: A — Aweb browser is software that runs on a server
The module places page storage on servers and page viewing with browsers on clients (p.9). A reverses that teaching role. B is consistent with hosted website files; C is explicit web-information storage; D matches the viewing role. Evidence: PDF p. 9, PDF p. 9, PDF p. 8.
Evidence in the complete study note
A browser/user agent requests resources and renders HTML/CSS, then runs permitted JavaScript.WEB01
A web/HTTP server receives requests and returns representations, sometimes invoking application code.WEB01
A website groups resources; a page is one document/resource.WEB02
Choice by choice
A · correct — False in the module client/server model.
B · incorrect — Consistent with the collection of hosted website files.
C · incorrect — Explicitly web information resides in pages.
D · incorrect — Consistent with browser viewing/rendering resources.
Question 153
Which one of the following terms refers to the machine on which the requested resource is
stored?
A. Port
B. Query
C. Host
D. Protocol
Hint / Module Reference (Where to Read)
Identify the role requested and compare it with the definitions and constraints in the cited passages.
The web hosting section says website files reside on a host/server; the location examples identify hostname as the web-host domain. Host therefore names the resource-storing machine role. Evidence: PDF p. 9, PDF p. 58, PDF p. 8.
Evidence in the complete study note
A URL identifies scheme, host, optional port, path, query and fragment; the host identifies the machine/service name, while a fragment selects a local document location.WEB02
Choice by choice
A · incorrect — Not the hosting computer role defined.
B · incorrect — A database/request operation does not name the hosting machine.
C · correct — Host matches the storage/serving machine role.
D · incorrect — HTTP is a communication standard rather than a storage machine.
Question 154
Which attribute of the <img> tag is used to display text in place of an image when the image is not
displayed?
A. rep
B. pla
C. alt
D. im
Hint / Module Reference (Where to Read)
Use the element or attribute meaning and document structure, rather than appearance or a similar-looking name.
The BOM discussion states that global JavaScript objects/functions/variables belong to window and even document is its property. Thus window is the top-level browser object in this teaching model. Evidence: PDF p. 56.
Evidence in the complete study note
In a normal browser page, window exposes the browsing context and document is its document property.WEB22
Choice by choice
A · incorrect — Generic root label is not the documented browser object name.
B · incorrect — Document is a property within window.
C · incorrect — Generic JavaScript object is not the named top-level object.
D · correct — Window contains the global members and document.
Question 156
Which CSS selector selects elements whose class list contains notice?
A. p
B. #notice
C. [type="email"]
D. .notice
Hint / Module Reference (Where to Read)
Identify which elements a rule targets and distinguish selector syntax from declaration syntax.
A class selector uses a dot followed by the class name, so .notice matches elements that have notice among their classes. An ID selector uses a hash and tests a different attribute. The remaining choices are a type selector and an attribute selector, each meaningful but aimed at another condition. The damaged options are replaced with explicit selector forms rather than claiming to recover an uncertain source-letter mapping.
Evidence in the complete study note
Type p selects paragraph elements, .notice selects a class, #logo an ID, h1,h2 groups selectors, nav ul selects descendants and nav>ul direct children.WEB11
Attribute selectors match properties such as [type="email"], pseudo-classes states such as :hover/:focus, and pseudo-elements parts such as ::before.WEB11
Choice by choice
A · incorrect — This selects paragraph elements by tag name.
B · incorrect — This selects the notice ID, not the class token.
C · incorrect — This tests the type attribute rather than the class list.
D · correct — This is the class selector for the notice token.
Question 157
Which option identifies components present in an HTTP/1.1 request even when it has no message body?
A. Header fields only
B. Header fields and a mandatory body
C. A response status line, header fields and a mandatory body
D. A request line and header fields
Hint / Module Reference (Where to Read)
Identify the protocol layer and the intended request, response or channel semantics.
Correct answer: D — A request line and header fields
HTTP/1.1 requests start with a request line, then contain header fields and a terminating blank line. A body is optional, so neither option that requires one describes every request. A status line begins a response, not a request. The version qualifier matters because HTTP/2 and HTTP/3 encode messages differently; the selected components refer specifically to the textual HTTP/1.1 structure, not every HTTP wire format.
Evidence in the complete study note
An HTTP/1.1 request begins with method, request-target and version, followed by header fields, a blank line, and an optional body.WEB03
A response begins with version, status code and optional reason phrase, then headers, blank line and permitted content.WEB03
Choice by choice
A · incorrect — This omits the request line.
B · incorrect — The body is optional, so making it mandatory is wrong.
C · incorrect — A status line belongs to a response, and a request body is optional.
D · correct — These components are present before any optional body.
Question 158
What will be the output of the following code snippet?
<script type="text/javascript" language= 'javascript' >
var a = "exitexam";
var result = a.substring(2, 6);
document.write(result);
</script>
A. xitex
B. texam
C. itex
D. xite
Hint / Module Reference (Where to Read)
Track the value and type at each operation, applying the stated conversion, indexing or mathematical rule.
substring(2,6) uses a zero-based start and excludes the end index. In exitexam, indices 2, 3, 4 and 5 contain i, t, e and x. document.write therefore emits itex. Starting at index 1 or continuing beyond index 5 produces a different interval, which rules out the other strings.
Evidence in the complete study note
A JS string’s substring(start,end) includes start and excludes end: "exitexam".substring(2,6) is "itex".WEB18
Choice by choice
A · incorrect — xitex starts at index one and contains five characters, rather than the requested four-character interval.
B · incorrect — texam starts too late and extends beyond the exclusive end index six.
C · correct — Indices two through five contain i, t, e, x, producing itex.
D · incorrect — xite begins at index one rather than the specified zero-based start index two.
Question 159
Default method while submitting a form is
A. Get method
B. Set method
C. Post method
D. Put method
Hint / Module Reference (Where to Read)
Separate the control role, displayed content, submitted value and form destination.
WEB09 explicitly says a form’s default method is GET. Therefore omitting the method attribute does not select POST or PUT. WEB04 further distinguishes GET query parameters from POST form bodies, but that difference does not change the default. Set is not the relevant form submission method named in the note.
Evidence in the complete study note
The default method is GET.WEB09
GET forms usually put name/value pairs in the URL query; POST forms put them in the body.WEB04
Choice by choice
A · correct — GET is the default method for an HTML form when its method attribute is omitted.
B · incorrect — Set is not the default HTML form submission method defined here.
C · incorrect — POST must be requested explicitly; it is not the form’s omitted-method default.
D · incorrect — PUT is not the default method selected by an ordinary HTML form.
Question 160
A variable declared _____ has a LOCAL SCOPE?
A. outside program
B. inside function
C. outside function
D. None of the Above
Hint / Module Reference (Where to Read)
Identify the role requested and compare it with the definitions and constraints in the cited passages.
WEB25 states that a function’s locals and by-value parameters are separate bindings from variables outside it. Thus a variable declared inside a function has ordinary local scope, unless a special explicit global binding is introduced. Outside function is the global-scope location, while outside program is not a meaningful declaration location in the script.
Evidence in the complete study note
A function’s locals and by-value parameters are separate bindings; use global $x or $GLOBALS["x"] to refer to a global explicitly.WEB25
A variable outside a function has global scope.WEB25
Choice by choice
A · incorrect — Outside program does not describe a declaration location within the executing PHP script.
B · correct — An ordinary declaration inside a function creates a local binding for that function.
C · incorrect — Variables declared outside functions have global scope under WEB25.
D · incorrect — Inside function is offered and matches the ordinary local-binding rule.
Question 161
What is the primary markup language used for structuring content on the web?
A. HTML
B. CSS
C. JavaScript
D. PHP
Hint / Module Reference (Where to Read)
Identify the role requested and compare it with the definitions and constraints in the cited passages.
HTML is explicitly a markup language telling browsers how to structure pages, while CSS handles appearance and JavaScript behavior. Evidence: PDF p. 10, PDF p. 60.
Evidence in the complete study note
HTML supplies structure/meaning; CSS controls presentation; JavaScript supplies programmable interactivity.WEB01
PHP, Python, JSP/Java and ASP.NET applications generate server responses and access databases; C# is commonly used with ASP.NET.WEB01
Choice by choice
A · correct — Exact markup/structure role.
B · incorrect — Stylesheet/presentation role.
C · incorrect — Programming/behavior role.
D · incorrect — Server-side scripting role.
Question 162
What is the purpose of CSS in web development?
A. To define the semantic document structure using HTML elements
B. To add interactivity and dynamic behavior to web pages
C. To control the visual appearance of web pages
D. To handle server-side processing and database interactions
Hint / Module Reference (Where to Read)
Identify the role requested and compare it with the definitions and constraints in the cited passages.
Correct answer: C — To control the visual appearance of web pages
CSS controls visual presentation, including colors, typography and layout. HTML supplies document structure and meaning; JavaScript supplies programmable browser interaction. Server technologies such as PHP generate responses and interact with databases. With the structural distractor confined to semantic elements, the presentation alternative is the unique description of CSS’s role.
Evidence in the complete study note
HTML supplies structure/meaning; CSS controls presentation; JavaScript supplies programmable interactivity.WEB01
PHP, Python, JSP/Java and ASP.NET applications generate server responses and access databases; C# is commonly used with ASP.NET.WEB01
Choice by choice
A · incorrect — Semantic document elements and structure are HTML’s role rather than CSS’s presentation role.
B · incorrect — Programmable interaction is the JavaScript role, distinct from CSS styling.
C · correct — Visual presentation is the central CSS role.
D · incorrect — Server processing and database access belong to server application code.
Question 163
Which programming language is primarily used for client-side scripting in web development?
A. HTML
B. CSS
C. JavaScript
D. PHP
Hint / Module Reference (Where to Read)
Identify the role requested and compare it with the definitions and constraints in the cited passages.
The client-side scripting chapter identifies JavaScript as the language adding browser behavior; HTML structures, CSS presents, PHP executes server-side. Evidence: PDF p. 44, PDF p. 60.
Evidence in the complete study note
HTML supplies structure/meaning; CSS controls presentation; JavaScript supplies programmable interactivity.WEB01
PHP, Python, JSP/Java and ASP.NET applications generate server responses and access databases; C# is commonly used with ASP.NET.WEB01
Choice by choice
A · incorrect — Markup structure, not the scripting language.
B · incorrect — Stylesheet presentation, not scripting.
C · correct — Exact browser scripting language.
D · incorrect — Server-side language in p.60.
Question 164
Which application-layer protocol defines the requests and responses used to retrieve web resources?
A. HTTP
B. FTP
C. TCP/IP
D. SMTP
Hint / Module Reference (Where to Read)
Identify the role requested and compare it with the definitions and constraints in the cited passages.
HTTP defines the application-level exchange for web resource requests and responses. TCP/IP supplies underlying communication facilities, so naming the application layer distinguishes the required role. FTP and SMTP concern other application services rather than the web resource exchange described. HTTPS adds TLS protection to HTTP; the question asks for the underlying web application protocol.
Evidence in the complete study note
The Internet connects networks; the Web is a resource system commonly using HTTP.WEB01
HTTP defines web application requests, response status codes and representations.WEB-S14
An HTTP exchange can use underlying TCP connections and IP addresses; naming that network stack does not identify the application-level method or status semantics.WEB-S14
FTP is a file-transfer application protocol.WEB-S14
SMTP transports electronic mail.WEB-S14
Choice by choice
A · correct — HTTP defines the web resource request/response exchange.
B · incorrect — FTP is a file-transfer protocol, not the application protocol defining the stated web resource exchange.
C · incorrect — TCP/IP names underlying network/transport facilities, not this application-layer request/response protocol.
D · incorrect — SMTP concerns mail transfer rather than the web resource request/response exchange.
Question 165
What is the purpose of a web server in web development?
A. To store and manage website files
B. To handle client-side scripting
C. To control the visual appearance of web pages
D. To ensure secure data transmission over the web
Hint / Module Reference (Where to Read)
Identify the role requested and compare it with the definitions and constraints in the cited passages.
Correct answer: A — To store and manage website files
Web servers store the files comprising websites and deliver pages to requesting browsers (p.9). Client interactivity and visual styling have separate JavaScript/CSS roles. Evidence: PDF p. 9, PDF p. 44.
Evidence in the complete study note
HTML supplies structure/meaning; CSS controls presentation; JavaScript supplies programmable interactivity.WEB01
PHP, Python, JSP/Java and ASP.NET applications generate server responses and access databases; C# is commonly used with ASP.NET.WEB01
Choice by choice
A · correct — Direct storage/hosting role.
B · incorrect — Client-side behavior is assigned to JavaScript.
C · incorrect — Presentation is assigned to CSS.
D · incorrect — Secure transport is not the general server definition supplied.
Question 166
Which listed DBMS is the open-source relational SQL server used by the course’s PHP database examples, including its MySQLi connection and query operations?
A. MySQL
B. Oracle
C. SQL Server
D. MongoDB
Hint / Module Reference (Where to Read)
Identify the API and operation first, then distinguish connection setup, statement execution and result processing.
The note identifies MySQL as an open-source SQL DBMS and uses it as the database server for the PHP MySQLi examples. The question asks for that specific course example, so MySQL is the matching system. Oracle, SQL Server and MongoDB are different named systems; this selection does not depend on an unsupported popularity ranking or a claim that no other database has open-source editions.
Evidence in the complete study note
MySQL is an open-source SQL database management system.WEB-S04
MySQL is a relational DBMS; a database persists structured application data and supports concurrent clients.WEB31
Choice by choice
A · correct — MySQL is the open-source SQL DBMS used as the server in the course’s MySQLi examples.
B · incorrect — Oracle is a different named database system, not the MySQL server used by these examples.
C · incorrect — SQL Server is a different named database system from the server used by the course’s MySQLi examples.
D · incorrect — MongoDB is not the named SQL server used by the course’s MySQLi examples.
Question 167
what is the purpose of a cookie in web development?
A. To store and retrieve user preferences and session information
B. To control the visual appearance of web pages
C. To handle client-side scripting
D. To ensure secure data transmission over the web
Hint / Module Reference (Where to Read)
Follow the identifier and server-side state through the stated lifecycle or access check; distinguish client-controlled claims from server decisions.
Correct answer: A — To store and retrieve user preferences and session information
Cookies remember user information across requests and are stored as name/value pairs (p.58). A matches retaining preferences/session information rather than styling, executing scripts or guaranteeing transport security. Evidence: PDF p. 58, PDF p. 59.
Evidence in the complete study note
Cookies are browser-held name/value data automatically attached to matching requests subject to domain, path, expiry, Secure and SameSite rules.WEB28
Normally the browser holds an opaque session identifier while data resides in server-controlled storage.WEB29
Choice by choice
A · correct — Matches remembering user information.
B · incorrect — Presentation is CSS, not cookie storage.
C · incorrect — Cookies store data, not the client scripting language itself.
D · incorrect — The cookie definition supplies no secure-transport guarantee.
Question 168
Which listed programming languages can execute server-side web application code? Select all that apply.
A. HTML
B. CSS
C. JavaScript
D. PHP
Hint / Module Reference (Where to Read)
Identify the role requested and compare it with the definitions and constraints in the cited passages.
Correct answers (select all): C, D — JavaScript; PHP
PHP is a server-response language, and JavaScript can execute on the server through runtimes such as Node.js. JavaScript is therefore not excluded merely because it also runs in browsers. HTML supplies document structure and CSS supplies presentation rules rather than the requested server application scripting role. Both supported programming-language choices must be selected under the revised multiple-selection wording.
Evidence in the complete study note
HTML supplies structure/meaning; CSS controls presentation; JavaScript supplies programmable interactivity.WEB01
PHP, Python, JSP/Java and ASP.NET applications generate server responses and access databases; C# is commonly used with ASP.NET.WEB01
Choice by choice
A · incorrect — HTML supplies document structure and meaning rather than server application scripting.
B · incorrect — CSS supplies presentation rules rather than server application scripting.
C · correct — JavaScript can run server-side, including through Node.js.
D · correct — PHP can generate server responses and access application data.
Question 169
What is the purpose of a framework in web development?
A. To ensure secure data transmission over the web
B. To control the visual appearance of web pages
C. To provide a foundation and structure for developing web applications
D. To handle client-side scripting
Hint / Module Reference (Where to Read)
Match the stated application requirement to the capabilities and category of each technology.
Correct answer: C — To provide a foundation and structure for developing web applications
The framework chapter describes integrated components, libraries and developer tools for building applications. This provides the reusable foundation in C; particular frameworks may also style or script pages, but those are narrower uses. Evidence: PDF p. 93, PDF p. 91.
Evidence in the complete study note
A framework supplies conventions and reusable structure; a library supplies callable capabilities.WEB38
Choice by choice
A · incorrect — Secure transport is not the general framework purpose given.
B · incorrect — Styling is a subset of Bootstrap functionality, not the general foundation role.
C · correct — Matches integrated application-building structure/tools.
D · incorrect — Client scripting is only one part of the framework examples.
Question 170
Which programming language is often used for building scalable and high-performance web
applications?
A. HTML
B. CSS
C. JavaScript
D. Node.js
Hint / Module Reference (Where to Read)
Identify the execution side and communication pattern, keeping runtime, transport, data format and callback roles distinct.
Correct answer: C — JavaScript is the language; Node.js is a runtime.
WEB01 explicitly distinguishes Node.js from the language it runs. JavaScript is therefore the offered programming-language answer for Node-based server applications. HTML and CSS supply structure and presentation. Scalability and performance depend on workload and architecture, as WEB36 explains, so the answer identifies the language without promising that its use alone guarantees high performance.
Evidence in the complete study note
Node.js is a JavaScript runtime, not a separate language.WEB01
One event-loop thread can handle many waiting requests, but long CPU loops or synchronous I/O block its callbacks.WEB36
Choice by choice
A · incorrect — HTML is structural markup rather than the server application language requested.
B · incorrect — CSS supplies presentation rather than programmable server application logic.
C · correct — JavaScript is the programming language used by Node applications.
D · incorrect — Node.js is a JavaScript runtime, not a separate programming language.
Question 171
What is the purpose of AJAX in web development?
A. To control the visual appearance of web pages
B. To handle client-side scripting
C. To ensure secure data transmission over the web
D. To enable asynchronous communication between the client and server
Hint / Module Reference (Where to Read)
Identify the execution side and communication pattern, keeping runtime, transport, data format and callback roles distinct.
Correct answer: D — To enable asynchronous communication between the client and server
AJAX asynchronously communicates with the server, exchanges data and updates pages without refresh (p.89). D is the precise purpose; client-side scripting is the broader environment, not the distinguishing function. Evidence: PDF p. 89.
Evidence in the complete study note
AJAX means Asynchronous JavaScript and XML, but responses can be JSON, text, HTML or XML.WEB34
It is a technique, not a language, standalone framework or mandatory XML protocol.WEB34
Choice by choice
A · incorrect — Visual styling is a cooperating CSS role.
B · incorrect — Broad surrounding activity, not the specific AJAX purpose.
C · incorrect — No secure-transport guarantee is given.
D · correct — Exact asynchronous client/server exchange purpose.
Question 172
Which listed formats can represent structured application data for server/browser interchange, rather than document presentation or styling? Select all that apply.
A. HTML
B. CSS
C. JSON
D. XML
Hint / Module Reference (Where to Read)
Identify the execution side and communication pattern, keeping runtime, transport, data format and callback roles distinct.
JSON represents structured values such as objects and arrays, while XML is another supported interchange format. A REST API may return either, so data interchange alone does not choose one uniquely. HTML can be delivered as a response document, but the revised question distinguishes that presentation role from the structured-data formats sought here. CSS expresses styling rules. JSON and XML therefore form the requested selection.
Evidence in the complete study note
JSON represents objects, arrays, strings, numbers, Booleans and null; keys/strings use double quotes, and functions/undefined are not JSON values.WEB35
XML is another valid interchange format.WEB35
HTML supplies structure/meaning; CSS controls presentation; JavaScript supplies programmable interactivity.WEB01
Choice by choice
A · incorrect — HTML’s role here is the response document, not the requested structured-data interchange format.
B · incorrect — CSS expresses presentation rules rather than application-data interchange.
C · correct — JSON represents structured data values for interchange.
D · correct — XML is another valid structured-data interchange format.
Question 173
What is the purpose of a content management system (CMS) in web development?
A. To store and manage website files
B. To control the visual appearance of web pages
C. To handle client-side scripting
D. To provide a user-friendly interface for managing website content
Hint / Module Reference (Where to Read)
Distinguish the purpose of each development or performance technique from its possible side effects.
Correct answer: D — An editor-facing interface for managing website content.
A CMS gives editors content creation, publishing, roles, and media management without editing every source file. That directly matches D’s user-facing content-management interface. File storage may support it but is not its complete purpose; CSS controls appearance and JavaScript supplies client scripting. The requested role is editorial content management.
Evidence in the complete study note
A CMS gives editors content creation, publishing, roles and media management without editing every source file.WEB39
HTML supplies structure/meaning; CSS controls presentation; JavaScript supplies programmable interactivity.WEB01
Choice by choice
A · incorrect — File storage can support a CMS, but does not capture its editor-facing content creation and publishing purpose.
B · incorrect — Visual presentation is primarily CSS’s role, not the defining purpose of a CMS.
C · incorrect — Client-side scripting is a JavaScript role rather than the CMS’s defining editorial function.
D · correct — A CMS provides editors an interface and workflow for creating, publishing, and managing site content.
Question 174
Which technique is used to improve the performance of web applications by caching
frequently accessed data or resources?
A. Compression
B. Minification
C. Caching
D. Encryption
Hint / Module Reference (Where to Read)
Distinguish the purpose of each development or performance technique from its possible side effects.
WEB39 defines caching as reusing a representation or result and requiring validity or invalidation rules. Keeping frequently accessed data for reuse is therefore Caching. Compression and minification reduce transfer or source size, while encryption protects data; none of those alone stores a reusable computed result. Cache keys and privacy still matter when using the technique safely.
Evidence in the complete study note
Caching reuses a representation/result and requires validity/invalidation rules.WEB39
WEB05 defines HTTPS as HTTP over TLS, protecting channel confidentiality and integrity and authenticating the server through certificate checks. That is the secure web-communication protocol among the main choices. Plain HTTP, FTP, and TCP/IP do not by their names supply that TLS-protected web exchange. The alternate option set places HTTPS at C, so its answer letter differs.
Evidence in the complete study note
HTTPS uses HTTP over TLS, protecting channel confidentiality/integrity and authenticating the server under certificate checks.WEB05
HTTP defines web application requests, response status codes and representations.WEB-S14
An HTTP exchange can use underlying TCP connections and IP addresses; naming that network stack does not identify the application-level method or status semantics.WEB-S14
FTP is a file-transfer application protocol.WEB-S14
SMTP transports electronic mail.WEB-S14
Choice by choice
A · incorrect — Plain HTTP does not by itself add TLS confidentiality, integrity, and certificate-based server authentication.
B · incorrect — FTP is not the HTTPS protocol for TLS-protected web communication identified in the note.
C · incorrect — TCP/IP names underlying networking protocols rather than the TLS-protected HTTP scheme requested.
D · correct — HTTPS is HTTP over TLS and supplies the channel protections described in WEB05.
Alternative version 1
Correct answer: C — HTTPS
This variant moves HTTPS to C and replaces the fourth choice with SMTP. WEB05 still identifies HTTPS as HTTP over TLS. HTTP alone lacks that channel protection, and FTP or SMTP does not name the secure web protocol requested, so the variant answer must use its own C label.
HTTPS uses HTTP over TLS, protecting channel confidentiality/integrity and authenticating the server under certificate checks.WEB05
HTTP defines web application requests, response status codes and representations.WEB-S14
An HTTP exchange can use underlying TCP connections and IP addresses; naming that network stack does not identify the application-level method or status semantics.WEB-S14
FTP is a file-transfer application protocol.WEB-S14
SMTP transports electronic mail.WEB-S14
A · incorrect — Plain HTTP does not itself provide the TLS channel protections described in WEB05.
B · incorrect — FTP is not the TLS-protected HTTP protocol used for the requested secure web exchange.
C · correct — HTTPS is HTTP over TLS, protecting confidentiality, integrity, and checked server identity.
D · incorrect — SMTP is not the HTTPS web protocol and does not answer the secure HTTP communication question.
Question 176
What is the purpose of a RESTful API in web development?
A. To control the visual appearance of web pages
B. To handle client-side scripting
C. To ensure secure data transmission over the web
D. To provide a standardized interface for accessing and manipulating web resources
Hint / Module Reference (Where to Read)
Identify the protocol layer and the intended request, response or channel semantics.
Correct answer: D — A uniform interface for accessing and manipulating resources.
WEB05 describes REST constraints including client/server separation, stateless requests, and a uniform resource interface. It associates identified resources with representations and methods for reading or changing them. D expresses that purpose. CSS handles appearance, JavaScript supplies client interactivity, and HTTPS supplies channel protection; none of those is the defining role of REST itself.
Evidence in the complete study note
A RESTful API follows constraints such as client/server separation, stateless requests, cacheability and a uniform resource interface.WEB05
Resources have identifiers and representations; JSON is common but not required.WEB05
Choice by choice
A · incorrect — Visual presentation is a CSS role, not the defining purpose of a REST resource interface.
B · incorrect — Client-side scripting is a JavaScript role rather than the definition of REST architecture.
C · incorrect — TLS/HTTPS protects transmission; a REST interface does not itself guarantee secure transport.
D · correct — REST supplies a uniform resource interface for accessing representations and requesting resource operations.
Question 177
What is the purpose of responsive web design?
A. To control the visual appearance of web pages
B. To handle client-side scripting
C. To ensure secure data transmission over the web
D. To create websites that adapt and display correctly on different devices and screen sizes
Hint / Module Reference (Where to Read)
Identify the requested presentation effect and layout context before matching the property or rule.
Correct answer: D — To create websites that adapt and display correctly on different devices and screen sizes
The framework chapter requires support for desktop, tablet and phone screen sizes and describes responsive mobile-first websites. D directly captures this adaptation goal. Evidence: PDF p. 91.
Evidence in the complete study note
Responsive design combines flexible layout, images, viewport metadata and media queries, for example @media(max-width:600px){.cards{grid-template-columns:1fr}}.WEB14
Meta charset declares encoding; description summarizes the page; viewport controls mobile viewport behavior.WEB06
Choice by choice
A · incorrect — General styling alone does not specify adaptation.
B · incorrect — Scripting alone does not specify adaptation.
C · incorrect — Transport security is unrelated to the described screen-size goal.
D · correct — Exact device/screen adaptation purpose.
Question 178
What is the purpose of version control systems (VCS) in web development?
A. To control the visual appearance of web pages
B. To handle client-side scripting
C. To ensure secure data transmission over the web
D. To track changes to source code and collaborate on web development projects
Hint / Module Reference (Where to Read)
Distinguish the purpose of each development or performance technique from its possible side effects.
Correct answer: D — Track source changes and support collaboration.
WEB39 defines VCS through recording source history, branches, and merges for review and collaboration. That directly matches D. Styling and client-side scripting are product technologies, while transport security is an HTTPS concern. A VCS can help teams review changes, but publishing a chosen build is a separate deployment action rather than its definition.
Evidence in the complete study note
A VCS records source history, branches and merges to support review/collaboration; deployment publishes a chosen build and is a separate operation.WEB39
Choice by choice
A · incorrect — VCS records source history; CSS rather than version control determines rendered appearance.
B · incorrect — Version control tracks scripts as files but does not execute client-side scripting.
C · incorrect — Version history and collaboration do not themselves provide secure web transport.
D · correct — Source history, branching, merging, and review support tracking changes and collaborating on development.
Question 179
Which web development concept refers to the practice of optimizing a website to rank higher
in search engine results?
A. Accessibility
B. Usability
C. SEO (Search Engine Optimization)
D. Performance optimization
Hint / Module Reference (Where to Read)
Distinguish the purpose of each development or performance technique from its possible side effects.
Correct answer: C — SEO: Search Engine Optimization
WEB39 describes SEO as improving discoverability through meaningful content, headings, metadata, links, and crawlable structure. That matches the practice of improving search-result visibility. Accessibility, usability, and performance can overlap with helpful site improvements, but none is the name of this search-discoverability objective. Ranking improvement is an aim, not a guarantee from a single metadata setting.
Evidence in the complete study note
SEO improves discoverability through meaningful content, headings, metadata, accessible links and crawlable structure; keyword metadata alone does not guarantee ranking.WEB39
Choice by choice
A · incorrect — Accessibility concerns usable access to content and controls, rather than naming the search-ranking optimization practice.
B · incorrect — Usability concerns user experience and task completion, not specifically search-engine discoverability.
C · correct — Search Engine Optimization names the practice of improving discoverability in search results.
D · incorrect — Performance optimization improves resource delivery or execution speed, not the specific search-ranking practice named here.
Question 180
Which activity is specifically used to detect XSS and SQL-injection weaknesses so they can then be repaired?
A. Encryption
B. Authentication
C. Authorization
D. Web application security testing
Hint / Module Reference (Where to Read)
Identify the data source or security responsibility precisely, and check whether a combined source or a different control could also qualify.
Correct answer: D — Web application security testing
Web application security testing can detect SQL injection and XSS and provide evidence for repairs. Detection does not by itself remove the flaws: safe query parameterization and context-appropriate output handling are still required. Encryption, authentication and authorization address other protection goals and do not perform the vulnerability-testing activity requested. Changing the stem from a claim of prevention to a detection task preserves the security-testing concept without overstating its effect.
Evidence in the complete study note
A security test can detect SQL injection or XSS but does not itself fix either.WEB27
Bind SQL parameters to keep values separate from commands.WEB27
Authentication verifies a claimed identity.WEB-S11
Authorization checks whether a particular entity is permitted to perform a requested action.WEB-S11
Choice by choice
A · incorrect — Encryption protects content but is not the requested detection activity.
B · incorrect — Authentication checks identity rather than testing for these code weaknesses.
C · incorrect — Authorization checks permitted actions rather than conducting vulnerability tests.
D · correct — This is the testing activity used to discover the specified weaknesses.
Question 181
A server request handler contains this fragment, with no user-defined syntax extensions:
$visitor = "Mimi";
echo "Hello, " . $visitor;
Which listed language accepts this fragment as written in its normal language environment?
A. HTML
B. CSS
C. JavaScript
D. PHP
Hint / Module Reference (Where to Read)
Trace the bindings and operations in order; preserve the exact string characters and distinguish returned values from emitted output.
The fragment uses a dollar-prefixed variable, the echo output construct and dot concatenation. Together these are valid PHP syntax, producing the greeting by joining two strings. JavaScript uses different output calls and does not use dot as this binary concatenation operator. HTML and CSS provide structure and presentation rather than directly executing this server-side statement sequence. Recognizing the actual syntax resolves the language choice without excluding JavaScript from server programming generally.
Evidence in the complete study note
Variables begin with $, then a letter/underscore and subsequent letters/digits/underscores; $AGE18 works but $18AGE does not.WEB23
echo is a language construct with no return value and can emit comma-separated expressions.WEB24
Dot concatenates; + is arithmetic.WEB24
Choice by choice
A · incorrect — HTML markup does not execute this variable assignment and output-construct sequence.
B · incorrect — CSS presentation rules do not execute this statement sequence.
C · incorrect — The echo construct and dot concatenation shown are not ordinary JavaScript syntax.
D · correct — PHP accepts the assignment, echo construct and dot concatenation as written.
Question 182
Which server-side scripting language is often used for building scalable and high-
performance web applications?
A. HTML
B. CSS
C. JavaScript
D. Node.js
Hint / Module Reference (Where to Read)
Identify the execution side and communication pattern, keeping runtime, transport, data format and callback roles distinct.
Correct answer: C — JavaScript, executed server-side by runtimes such as Node.js.
WEB01 directly distinguishes JavaScript as a language and Node.js as its runtime. The question asks for the language, so C is the category-correct option. WEB36 warns that long CPU work or synchronous I/O can block Node callbacks, so scalability is architectural and workload-dependent rather than a guarantee from the language name alone.
Evidence in the complete study note
Node.js is a JavaScript runtime, not a separate language.WEB01
One event-loop thread can handle many waiting requests, but long CPU loops or synchronous I/O block its callbacks.WEB36
Choice by choice
A · incorrect — HTML is markup for structure rather than server-side application scripting.
B · incorrect — CSS is presentation rather than the server application language requested.
C · correct — JavaScript is the language that runs in Node-based server applications.
D · incorrect — Node.js is a runtime, not a distinct server-side scripting language.
Question 183
What is the purpose of server-side scripting languages in web development?
A. To control the visual appearance of web pages
B. To handle client-side interactivity
C. To generate dynamic content and interact with databases
D. To ensure secure data transmission over the web
Hint / Module Reference (Where to Read)
Identify the role requested and compare it with the definitions and constraints in the cited passages.
Correct answer: C — To generate dynamic content and interact with databases
Server PHP generates dynamic output and connects sites to backend databases, enabling two-way communication (p.60). C combines those explicitly described purposes. Evidence: PDF p. 60, PDF p. 44.
Evidence in the complete study note
HTML supplies structure/meaning; CSS controls presentation; JavaScript supplies programmable interactivity.WEB01
PHP, Python, JSP/Java and ASP.NET applications generate server responses and access databases; C# is commonly used with ASP.NET.WEB01
Choice by choice
A · incorrect — CSS presentation role.
B · incorrect — Client JavaScript role.
C · correct — Exact dynamic-output/database role.
D · incorrect — Transport security is not the stated server scripting purpose.
Question 184
Which of the following is a server-side scripting language for Microsoft's ASP.NET
framework?
A. Python
B. Ruby
C. C#
D. Java
Hint / Module Reference (Where to Read)
Identify the role requested and compare it with the definitions and constraints in the cited passages.
WEB01 explicitly states that C# is commonly used with ASP.NET. That identifies the requested language among the main options. Python and Java can be used for server applications in other roles described here, but are not its stated ASP.NET pairing. The answer concerns language/framework association, not a claim that only one language can ever interact with the platform.
Evidence in the complete study note
PHP, Python, JSP/Java and ASP.NET applications generate server responses and access databases; C# is commonly used with ASP.NET.WEB01
Choice by choice
A · incorrect — Python is a server-side language, but it is not the ASP.NET language pairing identified in WEB01.
B · incorrect — Ruby is not the language explicitly paired with ASP.NET in the supplied note.
C · correct — WEB01 explicitly states that C# is commonly used with ASP.NET.
D · incorrect — The note associates Java with JSP/Java server applications, while identifying C# for ASP.NET.
Question 185
Which client-side scripting language is supported by all modern web browsers?
A. HTML
B. CSS
C. JavaScript
D. PHP
Hint / Module Reference (Where to Read)
Identify the role requested and compare it with the definitions and constraints in the cited passages.
The JavaScript chapter describes browser functionality and modern browser JavaScript interactivity. C matches the client scripting language; HTML and CSS have different structural/presentation roles and PHP is server-side. Evidence: PDF p. 44, PDF p. 56, PDF p. 60.
Evidence in the complete study note
HTML supplies structure/meaning; CSS controls presentation; JavaScript supplies programmable interactivity.WEB01
PHP, Python, JSP/Java and ASP.NET applications generate server responses and access databases; C# is commonly used with ASP.NET.WEB01
Choice by choice
A · incorrect — Markup language, not scripting.
B · incorrect — Stylesheet language, not scripting.
C · correct — Browser scripting language described throughout chapter 4.
D · incorrect — Explicit server-side language.
Question 186
What is the purpose of client-side scripting languages in web development?
A. To control the visual appearance of web pages
B. To handle server-side processing and database interactions
C. To generate dynamic content and interact with databases
D. To add interactivity and dynamic behavior to web pages
Hint / Module Reference (Where to Read)
Identify the role requested and compare it with the definitions and constraints in the cited passages.
Correct answer: D — To add interactivity and dynamic behavior to web pages
JavaScript implements timely updates, interactive maps and animated graphics (p.44). This is the client-side interactivity/dynamic-behavior purpose in D. Evidence: PDF p. 44, PDF p. 60.
Evidence in the complete study note
HTML supplies structure/meaning; CSS controls presentation; JavaScript supplies programmable interactivity.WEB01
PHP, Python, JSP/Java and ASP.NET applications generate server responses and access databases; C# is commonly used with ASP.NET.WEB01
Choice by choice
A · incorrect — CSS presentation is a different layer.
B · incorrect — Server/database processing belongs to server scripting.
C · incorrect — Server-generated database output is a different role.
D · correct — Matches interactive client behavior.
Question 187
Which client-side scripting language is primarily used for manipulating the Document Object
Model (DOM) of a web page?
A. HTML
B. CSS
C. JavaScript
D. PHP
Hint / Module Reference (Where to Read)
Track which node is selected or created, and distinguish changing content from attaching a node.
The module JavaScript DOM section explains accessing elements and changing document structure, style and content. That makes JavaScript the client scripting language for DOM manipulation. Evidence: PDF p. 52, PDF p. 60.
Evidence in the complete study note
HTML supplies structure/meaning; CSS controls presentation; JavaScript supplies programmable interactivity.WEB01
The DOM is a hierarchy of nodes representing the document.WEB20
Choice by choice
A · incorrect — HTML supplies structure rather than the client scripting operation.
B · incorrect — CSS styles content rather than being the scripting language.
C · correct — Explicitly uses DOM APIs to access/change pages.
D · incorrect — PHP executes on the server in this module.
Question 188
Which client-side scripting language is often used for validating form inputs on web pages?
A. HTML
B. CSS
C. JavaScript
D. PHP
Hint / Module Reference (Where to Read)
Separate event dispatch, handler registration and cancellation of the browser default action.
The module includes a JavaScript form-validation example checking an empty field and prompting the user. C identifies the scripting language performing that check. Evidence: PDF p. 55, PDF p. 73.
Evidence in the complete study note
HTML supplies structure/meaning; CSS controls presentation; JavaScript supplies programmable interactivity.WEB01
For submission, form.addEventListener("submit",e=>{if(!valid()){e.preventDefault();}}) stops the default only on failure.WEB21
Browser checks improve feedback; repeat validation and authorization on the server.WEB21
Choice by choice
A · incorrect — HTML can provide basic validation but is not the requested scripting language.
B · incorrect — Presentation language, not this validation script.
C · correct — Exact language of the documented validation example.
D · incorrect — PHP validates on the server, not in the browser.
Question 189
Which client-side scripting technique allows for loading new content into a web page without
a full page reload?
A. AJAX
B. JSON
C. XML
D. Bootstrap
Hint / Module Reference (Where to Read)
Identify the execution side and communication pattern, keeping runtime, transport, data format and callback roles distinct.
AJAX explicitly requests data and updates a page without full refresh. JSON/XML are possible exchange formats, and Bootstrap is a responsive UI framework. Evidence: PDF p. 89, PDF p. 91.
Evidence in the complete study note
AJAX means Asynchronous JavaScript and XML, but responses can be JSON, text, HTML or XML.WEB34
Bootstrap supplies layout/components.WEB38
JSON represents objects, arrays, strings, numbers, Booleans and null; keys/strings use double quotes, and functions/undefined are not JSON values.WEB35
Choice by choice
A · correct — Exact no-refresh exchange technique.
B · incorrect — A supported data format, not the exchange technique.
C · incorrect — Another data format, not the technique.
D · incorrect — Responsive framework, not the AJAX request mechanism.
Question 190
A course-catalog page already has CSS that switches between one and three columns at the required viewport widths. It still needs a browser-side filter that updates the visible course cards without a full-page reload. With suitable application code, which listed technologies can implement that interaction while retaining the CSS layout? Select all that apply.
A. jQuery
B. React
C. Angular
D. Vue.js
Hint / Module Reference (Where to Read)
Match the stated application requirement to the capabilities and category of each technology.
Correct answers (select all): A, B, C, D — jQuery; React; Angular; Vue.js
The responsive layout is already supplied by CSS; the remaining task is programmable interface behavior. jQuery can update the DOM, and React, Angular and Vue can implement the filter and visible-card updates through their interface facilities. None is uniquely required by this interaction. All four remain possible choices when suitable application code is supplied, without implying that selecting any toolkit automatically implements responsiveness or the filter itself.
Evidence in the complete study note
jQuery simplifies DOM operations; React builds component interfaces; Angular is a component platform, distinct from older AngularJS; Vue also builds interactive interfaces.WEB38
Each can contribute to a responsive interface, so those generic descriptions do not identify one unique framework.WEB38
Choice by choice
A · correct — jQuery can handle filter interaction and update existing DOM content while the CSS controls layout.
B · correct — React can render the filtered card interface while using the supplied responsive CSS.
C · correct — Angular can implement the filter interaction and visible-card updates with the existing layout styles.
D · correct — Vue can update visible cards in response to filter input while retaining responsive styles.
Question 191
A page sends asynchronous HTTP requests and uses each response to update part of the page without a full navigation. Which listed technique names this browser request-and-update pattern?
A. AJAX
B. JSON
C. Websockets
D. RESTful API
Hint / Module Reference (Where to Read)
Identify the execution side and communication pattern, keeping runtime, transport, data format and callback roles distinct.
AJAX is the technique of using asynchronous browser HTTP requests to obtain data and update part of a page. It can carry JSON, XML or other response formats. JSON names a data representation, while WebSocket supplies a persistent bidirectional message channel rather than the stated repeated HTTP request/response pattern. A RESTful API describes the server interface organization, not the browser update technique.
Evidence in the complete study note
AJAX means Asynchronous JavaScript and XML, but responses can be JSON, text, HTML or XML.WEB34
Configure an XHR with open("GET",url,true), register response/error handlers and call send().WEB34
WebSocket establishes a persistent bidirectional message channel after its handshake.WEB35
JSON represents objects, arrays, strings, numbers, Booleans and null; keys/strings use double quotes, and functions/undefined are not JSON values.WEB35
A RESTful API follows constraints such as client/server separation, stateless requests, cacheability and a uniform resource interface.WEB05
Choice by choice
A · correct — AJAX names the asynchronous HTTP request-and-partial-update technique described.
B · incorrect — JSON can encode a response but does not perform browser requests or update the page.
C · incorrect — WebSocket uses a persistent bidirectional channel; that is not the specified HTTP request/response technique.
D · incorrect — A RESTful API can serve the requests, but names an interface style rather than the client’s request-and-update technique.
Question 192
Which techniques store data locally in a user’s browser? Select all that apply.
A. Cookies
B. Local storage
C. Session storage
D. IndexedDB
Hint / Module Reference (Where to Read)
Identify the role requested and compare it with the definitions and constraints in the cited passages.
Correct answers (select all): A, B, C, D — Cookies; Local storage; Session storage; IndexedDB
All four entries are browser storage techniques, although their persistence, data model and automatic transmission behavior differ. Cookies hold browser name/value data that can accompany matching requests. localStorage persists origin-specific strings, sessionStorage is scoped to a page session or tab, and IndexedDB supports structured local data. The revised question asks for every local-storage technique rather than assuming that only the API named local storage qualifies.
Evidence in the complete study note
Cookies are browser-held name/value data automatically attached to matching requests subject to domain, path, expiry, Secure and SameSite rules.WEB28
localStorage persists origin-specific string values across sessions until removed/cleared; sessionStorage is scoped to a page session/tab.WEB28
IndexedDB supplies structured local storage.WEB28
Choice by choice
A · correct — Cookies are browser-held name/value data, even though matching requests can transmit them.
B · correct — localStorage persists origin-specific string values until removed or cleared.
C · correct — sessionStorage stores browser data within a page-session or tab scope.
D · correct — IndexedDB supplies structured local browser storage.
Question 193
Which source-processing step removes unnecessary characters from CSS or JavaScript, distinct from bundling files together or compressing transfer encoding?
A. Compression
B. Caching
C. Minification
D. Encryption
Hint / Module Reference (Where to Read)
Distinguish the purpose of each development or performance technique from its possible side effects.
Minification removes unnecessary source characters, such as dispensable formatting, while preserving the intended program or stylesheet behavior. Bundling combines files and compression changes transfer encoding; these are separate operations even when a build pipeline performs them together. Caching instead reuses an existing representation, and encryption serves confidentiality. Restricting the question to source-character reduction makes minification the supported technique without claiming it also performs file combination.
Events signal user actions and handlers run functions in response, including click events (p.53). A names this mechanism. Validation is a particular task, and responsive design/browser compatibility do not name action dispatch. Evidence: PDF p. 53.
Evidence in the complete study note
An event handler runs when an event occurs: click, input, keydown, mouseover, submit and load are examples.WEB21
Browser compatibility requires feature testing and fallbacks; responsive size handling is a different issue.WEB14
Choice by choice
A · correct — Exact handler mechanism.
B · incorrect — Checks fields rather than the general interaction mechanism.
C · incorrect — Adapts layout rather than dispatching user actions.
D · incorrect — Cross-browser support is not the event dispatch mechanism.
Question 195
Which client-side technique is used to ensure that a web page displays correctly across
different devices and screen sizes?
A. Event handling
B. Form validation
C. Responsive design
D. Browser compatibility
Hint / Module Reference (Where to Read)
Identify the requested presentation effect and layout context before matching the property or rule.
Responsive websites support desktop/tablet/phone screen sizes in the Bootstrap chapter. That fits devices and screen sizes; browser compatibility is a related but different browser-engine concern. Evidence: PDF p. 91.
Evidence in the complete study note
Responsive design combines flexible layout, images, viewport metadata and media queries, for example @media(max-width:600px){.cards{grid-template-columns:1fr}}.WEB14
Browser compatibility requires feature testing and fallbacks; responsive size handling is a different issue.WEB14
Choice by choice
A · incorrect — Handles actions rather than screen size.
B · incorrect — Checks input rather than screen size.
C · correct — Exact screen adaptation concept.
D · incorrect — Different browsers are a separate axis from device dimensions.
Question 196
Which browser technique sends an asynchronous HTTP request, then processes a JSON response through a callback or promise without reloading the whole page? Choose the technique, rather than a resource-interface style or a persistent messaging protocol.
A. AJAX
B. Websockets
C. RESTful API
D. Bootstrap
Hint / Module Reference (Where to Read)
Identify the execution side and communication pattern, keeping runtime, transport, data format and callback roles distinct.
AJAX describes asynchronous browser/server requests and response handling; despite its name, the returned data need not be XML and can be JSON. The scenario specifically uses an HTTP request with a later handler rather than a persistent bidirectional messaging channel. A RESTful API describes a resource-interface architecture that the request might use, while Bootstrap supplies interface components. Those can coexist with the interaction but do not name the requested browser technique.
Evidence in the complete study note
AJAX means Asynchronous JavaScript and XML, but responses can be JSON, text, HTML or XML.WEB34
A callback is a function invoked later by the runtime/API.WEB34
WebSocket establishes a persistent bidirectional message channel after its handshake.WEB35
A RESTful API follows constraints such as client/server separation, stateless requests, cacheability and a uniform resource interface.WEB05
Choice by choice
A · correct — AJAX names the asynchronous HTTP request-and-response technique described.
B · incorrect — WebSocket is a persistent bidirectional messaging channel rather than this HTTP-request technique.
C · incorrect — REST describes resource-interface constraints, not the requested browser execution technique.
D · incorrect — Bootstrap supplies interface components, not this request-handling technique.
Question 197
Which listed technologies can implement interactive behaviors such as tooltips and modals, with suitable application code or components? Select all that apply.
A. jQuery
B. React
C. Angular
D. Vue.js
Hint / Module Reference (Where to Read)
Match the stated application requirement to the capabilities and category of each technology.
Correct answers (select all): A, B, C, D — jQuery; React; Angular; Vue.js
Tooltips and modals are interface behaviors, not a unique signature of one library or platform. jQuery can manipulate the DOM, while React, Angular and Vue can implement such interactions through component-based application logic. The question explicitly permits suitable code or components, so it does not claim every behavior is bundled into each technology by default. All four can contribute and therefore belong in the selection.
Evidence in the complete study note
jQuery simplifies DOM operations; React builds component interfaces; Angular is a component platform, distinct from older AngularJS; Vue also builds interactive interfaces.WEB38
Choice by choice
A · correct — jQuery DOM operations can implement the stated interactions.
B · correct — React components can implement the stated interactions.
C · correct — Angular components can implement the stated interactions.
D · correct — Vue components can implement the stated interactions.
Question 198
Which client-side technique is used to create visually appealing and responsive layouts for
web pages?
A. HTML
B. CSS
C. JavaScript
D. PHP
Hint / Module Reference (Where to Read)
Identify the requested presentation effect and layout context before matching the property or rule.
CSS is explicitly presentation code, including layout properties; HTML supplies structure, JavaScript behavior and PHP server processing. B is the intended layout-styling technology. Evidence: PDF p. 26, PDF p. 37, PDF p. 60.
Evidence in the complete study note
HTML supplies structure/meaning; CSS controls presentation; JavaScript supplies programmable interactivity.WEB01
Responsive design combines flexible layout, images, viewport metadata and media queries, for example @media(max-width:600px){.cards{grid-template-columns:1fr}}.WEB14
Choice by choice
A · incorrect — Structure rather than the principal styling layer.
B · correct — Styles and layout match the CSS presentation role.
C · incorrect — Behavior rather than primary layout styling.
D · incorrect — Server output rather than browser styling rules.
Question 199
Which client-side technique is used to optimize web page loading speed by preloading
resources in advance?
A. Compression
B. Minification
C. Caching
D. Preloading
Hint / Module Reference (Where to Read)
Distinguish the purpose of each development or performance technique from its possible side effects.
WEB39 defines preloading as fetching anticipated resources early. That exactly matches preloading resources in advance in the stem. Compression and minification change transfer or source size, while caching reuses a representation already obtained. Preloading can help loading speed when chosen well, but excessive early fetching can compete with critical work, so performance should be measured.
The framework chapter says sites must support all browser types as well as screen sizes. Different-browser correctness is browser compatibility; responsive design concerns the separate size/device aspect. Evidence: PDF p. 91.
Evidence in the complete study note
Browser compatibility requires feature testing and fallbacks; responsive size handling is a different issue.WEB14
Choice by choice
A · incorrect — Handles interactions rather than browser differences.
B · incorrect — Checks form input rather than browser rendering support.
C · incorrect — Screen-size adaptation is a separate requirement.
D · correct — Names the cross-browser correctness requirement.
Question 201
What is the purpose of HTML in web programming?
A. To control the visual appearance of web pages
B. To handle server-side processing and database interactions
C. To specify the structure and content of web pages
D. To add interactivity and dynamic behavior to web pages
Hint / Module Reference (Where to Read)
Identify the role requested and compare it with the definitions and constraints in the cited passages.
Correct answer: C — To specify the structure and content of web pages
HTML defines the meaning and structure of web content. The module separately assigns appearance to CSS and behavior to JavaScript, while PHP handles server-side output. Evidence: PDF p. 10, PDF p. 60.
Evidence in the complete study note
HTML supplies structure/meaning; CSS controls presentation; JavaScript supplies programmable interactivity.WEB01
Choice by choice
A · incorrect — CSS presentation role.
B · incorrect — Server scripting/database role.
C · correct — Exact HTML structure/content role.
D · incorrect — JavaScript behavior role.
Question 202
Which HTML element is used to create a heading in a web page?
A. <p>
B. <div>
C. <h1>
D. <a>
Hint / Module Reference (Where to Read)
Use the element or attribute meaning and document structure, rather than appearance or a similar-looking name.
Heading formats range from h1 to h6 (p.15). The displayed h1 choice is one of these; p is paragraph, a is link, and div is not identified as a heading format. Evidence: PDF p. 15, PDF p. 15, PDF p. 14.
Evidence in the complete study note
Heading levels h1–h6 express hierarchy, with h6 conventionally smallest in default styling, not a mandatory CSS size.WEB06
<p> marks paragraphs; <br> is a line break and <hr> a thematic break.WEB06
Use <a href="page.html">Read</a> for a link; href is the destination, not url/link.WEB07
Choice by choice
A · incorrect — Paragraph rather than heading.
B · incorrect — Not one of the documented heading tags.
C · correct — Documented heading tag.
D · incorrect — Anchor/link rather than heading.
Question 203
Which HTML element is used to create a paragraph in a web page?
A. <h1>
B. <div>
C. <p>
D. <a>
Hint / Module Reference (Where to Read)
Use the element or attribute meaning and document structure, rather than appearance or a similar-looking name.
The paragraph section gives <p>...</p> explicitly. Headings and anchors have their own different formats, so C is the named paragraph element. Evidence: PDF p. 15, PDF p. 15, PDF p. 14.
Evidence in the complete study note
<p> marks paragraphs; <br> is a line break and <hr> a thematic break.WEB06
Heading levels h1–h6 express hierarchy, with h6 conventionally smallest in default styling, not a mandatory CSS size.WEB06
Choice by choice
A · incorrect — Heading, not paragraph.
B · incorrect — Generic container is not the specified paragraph element.
C · correct — Exact paragraph element.
D · incorrect — Anchor/link, not paragraph.
Question 204
Which HTML element is used to create an unordered list in a web page?
A. <ul>
B. <li>
C. <ol>
D. <a>
Hint / Module Reference (Where to Read)
Use the element or attribute meaning and document structure, rather than appearance or a similar-looking name.
The module names ul unordered lists and shows li nested inside it. ol is ordered, while a provides hyperlinks. Evidence: PDF p. 18, PDF p. 19, PDF p. 19, PDF p. 14.
Evidence in the complete study note
Unordered <ul> and ordered <ol> contain <li> items.WEB08
Use <a href="page.html">Read</a> for a link; href is the destination, not url/link.WEB07
Choice by choice
A · correct — Unordered-list container.
B · incorrect — List item rather than container.
C · incorrect — Ordered-list container.
D · incorrect — Link rather than list container.
Question 205
Which HTML element is used to create a link in a web page?
A. <h1>
B. <div>
C. <p>
D. <a>
Hint / Module Reference (Where to Read)
Use the element or attribute meaning and document structure, rather than appearance or a similar-looking name.
The margin is expressly whitespace between a box and other elements, outside border and padding. Padding surrounds content within the box, so C fits spacing between elements. Evidence: PDF p. 36, PDF p. 34.
Evidence in the complete study note
color sets text color; background-color sets background; font-size size, font-family face, font-style italic, font-weight weight, text-align inline-content alignment, and text-decoration effects such as underline.WEB13
The module explicitly defines color as setting foreground content color. Font size controls dimensions; margin/padding control whitespace. Evidence: PDF p. 34, PDF p. 36.
Evidence in the complete study note
color sets text color; background-color sets background; font-size size, font-family face, font-style italic, font-weight weight, text-align inline-content alignment, and text-decoration effects such as underline.WEB13
Font-size is explicitly listed as the font-size component, required in a multi-property font shorthand. B controls text size; the alternatives control color or whitespace. Evidence: PDF p. 34, PDF p. 36.
Evidence in the complete study note
color sets text color; background-color sets background; font-size size, font-family face, font-style italic, font-weight weight, text-align inline-content alignment, and text-decoration effects such as underline.WEB13
vertical-align applies in table-cell and inline contexts. With an ordinary horizontal-writing table cell specified, it controls the vertical placement of the cell’s content. text-align handles inline-content text alignment, while flex or grid alignment properties have their own axis and line-distribution contexts. The table-cell qualifier is essential because vertical-align does not vertically center arbitrary block containers simply because they contain content.
Evidence in the complete study note
vertical-align applies to inline/table-cell contexts and does not center every block.WEB14
Flexbox arranges direct children on a main axis; justify-content follows that axis, align-items the cross axis.WEB14
color sets text color; background-color sets background; font-size size, font-family face, font-style italic, font-weight weight, text-align inline-content alignment, and text-decoration effects such as underline.WEB13
Choice by choice
A · incorrect — text-align handles inline-content alignment rather than vertical cell placement.
B · correct — vertical-align applies to the specified table-cell context.
C · incorrect — align-content distributes applicable lines or tracks, not ordinary table-cell content.
D · incorrect — justify-content follows a flex/grid main-axis context rather than this table-cell mechanism.
Question 210
Which CSS property is used to create a border around an element in a web page?
A. color
B. font-size
C. border
D. padding
Hint / Module Reference (Where to Read)
Identify the requested presentation effect and layout context before matching the property or rule.
The border box wraps content and padding and is controlled with border properties (p.36). The table section also explicitly says border sets borders. Evidence: PDF p. 36, PDF p. 38.
Evidence in the complete study note
color sets text color; background-color sets background; font-size size, font-family face, font-style italic, font-weight weight, text-align inline-content alignment, and text-decoration effects such as underline.WEB13
Padding sits around the content as whitespace; the border wraps that padding. Therefore the internal space inside an element border is padding. Evidence: PDF p. 36.
Evidence in the complete study note
color sets text color; background-color sets background; font-size size, font-family face, font-style italic, font-weight weight, text-align inline-content alignment, and text-decoration effects such as underline.WEB13
A CMS gives editors tools to create, publish, and manage content without editing each source file. That is the technology aimed at information-rich website content management. HTML structures documents, CSS styles them, and JavaScript adds behavior, but those technologies alone do not supply the complete editorial management interface described.
Evidence in the complete study note
A CMS gives editors content creation, publishing, roles and media management without editing every source file.WEB39
HTML supplies structure/meaning; CSS controls presentation; JavaScript supplies programmable interactivity.WEB01
Choice by choice
A · incorrect — HTML structures document content but does not by itself provide an editorial management workflow.
B · incorrect — CSS controls presentation rather than managing editorial content creation, publication, and roles.
C · incorrect — JavaScript can implement behavior but is not itself the complete content-management system requested.
D · correct — A CMS provides editor-facing creation, publishing, role, and media tools for managing website content.
Question 213
What is the database’s direct role in a web application?
A. To control the visual appearance of web pages
B. To store persistent application data and support queries over that data
C. To specify the structure and content of web pages
D. To add interactivity and dynamic behavior to web pages
Hint / Module Reference (Where to Read)
Identify the API and operation first, then distinguish connection setup, statement execution and result processing.
Correct answer: B — To store persistent application data and support queries over that data
A database stores persistent structured application facts and supports operations that retrieve or change them. It is not the whole application server, which also performs validation, authorization and response generation. HTML describes document structure, CSS controls visual presentation and browser scripting supplies client interaction. The option states the database’s actual storage/query role rather than attributing all server-side processing to it.
Evidence in the complete study note
MySQL is a relational DBMS; a database persists structured application data and supports concurrent clients.WEB31
A database stores persistent facts; it is not itself the whole server application.WEB39
HTML supplies structure/meaning; CSS controls presentation; JavaScript supplies programmable interactivity.WEB01
Choice by choice
A · incorrect — Visual presentation is the role of CSS.
B · correct — Persistent data storage and queries are the database’s direct role.
C · incorrect — Document structure is the role of HTML.
D · incorrect — Client-side interactivity is a scripting role rather than the database’s direct purpose.
Question 214
Which SQL statement is used to retrieve data from a database?
A. INSERT INTO
B. UPDATE
C. DELETE FROM
D. SELECT
Hint / Module Reference (Where to Read)
Identify the API and operation first, then distinguish connection setup, statement execution and result processing.
The SELECT query example selects all student records and then fetches them. INSERT, UPDATE and DELETE are listed as other commands, not the demonstrated retrieval operation. Evidence: PDF p. 80, PDF p. 80.
A · incorrect — Not the retrieval command used in the example.
B · incorrect — Not the retrieval command used in the example.
C · incorrect — Not the retrieval command used in the example.
D · correct — SELECT is used before fetching records.
Question 215
A server starts by executing the following CommonJS source directly and registers a callback for incoming HTTP requests:
const http = require("node:http");
http.createServer((req, res) => { res.end("Ready"); }).listen(8000);
Which listed programming language is executing this request handler?
A. HTML
B. CSS
C. JavaScript
D. PHP
Hint / Module Reference (Where to Read)
Identify the execution side and communication pattern, keeping runtime, transport, data format and callback roles distinct.
The CommonJS server runs in Node.js, which is a JavaScript runtime rather than a separate programming language. The require call loads the HTTP module, and the callback passed to createServer handles incoming requests and ends each response. PHP can also generate server responses, but this particular source uses the Node JavaScript API and syntax. HTML and CSS do not execute the handler as a server program.
Evidence in the complete study note
Node.js is a JavaScript runtime, not a separate language.WEB01
A minimal CommonJS Node server can use const http=require("node:http"); http.createServer((req,res)=>{res.writeHead(200,{"Content-Type":"text/plain"});res.end("Hello");}).listen(8000);.WEB36
The request listener runs for incoming requests; end completes the response.WEB36
Choice by choice
A · incorrect — HTML supplies document structure rather than executing the module load and request callback.
B · incorrect — CSS supplies presentation rules rather than this executable request handler.
C · correct — Node.js executes this CommonJS request handler as JavaScript.
D · incorrect — PHP supports server programming but does not directly execute this CommonJS source.
Question 216
Which HTML form element is used to create a text input field?
A. <input type="text">
B. <input type="checkbox">
C. <input type="radio">
D. <input type="submit">
Hint / Module Reference (Where to Read)
Separate the control role, displayed content, submitted value and form destination.
The input type list identifies text as the usual text input and distinguishes checkbox/radio. The example on p.56 uses input type=text with a Name field. Evidence: PDF p. 22, PDF p. 56, PDF p. 22.
Evidence in the complete study note
In an input element, type="text" creates text entry, type="checkbox" an independently selectable checkbox, type="radio" a radio choice, and type="submit" a submit button.WEB-S02
Same-name radio buttons form a single-choice group; checkboxes permit independent selections.WEB09
submit submits; button has no submission action by itself.WEB09
Choice by choice
A · correct — Exact text-input type.
B · incorrect — Checkbox type instead.
C · incorrect — Radio type instead.
D · incorrect — Button submission type instead of text entry.
Question 217
Which HTML form element is used to create a checkbox?
A. <input type="text">
B. <input type="checkbox">
C. <input type="radio">
D. <input type="submit">
Hint / Module Reference (Where to Read)
Separate the control role, displayed content, submitted value and form destination.
The module input type list includes Checkbox separately from Text and Radio. Therefore input type=checkbox is the checkbox control, not a text field, radio choice or submit button. Evidence: PDF p. 22, PDF p. 22.
Evidence in the complete study note
In an input element, type="text" creates text entry, type="checkbox" an independently selectable checkbox, type="radio" a radio choice, and type="submit" a submit button.WEB-S02
Same-name radio buttons form a single-choice group; checkboxes permit independent selections.WEB09
submit submits; button has no submission action by itself.WEB09
Choice by choice
A · incorrect — Text entry control.
B · correct — Exact checkbox type.
C · incorrect — Radio control instead.
D · incorrect — Submit button instead.
Question 218
Which HTML form element is used to create a radio button?
A. <input type="text">
B. <input type="checkbox">
C. <input type="radio">
D. <input type="submit">
Hint / Module Reference (Where to Read)
Separate the control role, displayed content, submitted value and form destination.
The module distinguishes the Radio input type from Text and Checkbox. C therefore specifies a radio button. Evidence: PDF p. 22, PDF p. 22.
Evidence in the complete study note
In an input element, type="text" creates text entry, type="checkbox" an independently selectable checkbox, type="radio" a radio choice, and type="submit" a submit button.WEB-S02
Same-name radio buttons form a single-choice group; checkboxes permit independent selections.WEB09
submit submits; button has no submission action by itself.WEB09
Choice by choice
A · incorrect — Text entry instead.
B · incorrect — Checkbox instead.
C · correct — Exact radio input type.
D · incorrect — Submit button instead.
Question 219
Which HTML form element is used to create a button that submits a form?
A. <input type="text">
B. <input type="checkbox">
C. <input type="radio">
D. <input type="submit">
Hint / Module Reference (Where to Read)
Separate the control role, displayed content, submitted value and form destination.
The button-controls list includes Submit as an input type. Combined with the form submission description, D is the form-submitting button; the others collect text or selections. Evidence: PDF p. 22, PDF p. 21, PDF p. 22.
Evidence in the complete study note
In an input element, type="text" creates text entry, type="checkbox" an independently selectable checkbox, type="radio" a radio choice, and type="submit" a submit button.WEB-S02
Same-name radio buttons form a single-choice group; checkboxes permit independent selections.WEB09
submit submits; button has no submission action by itself.WEB09
Choice by choice
A · incorrect — Text input, not submission button.
B · incorrect — Checkbox selection, not submission button.
C · incorrect — Radio selection, not submission button.
D · correct — Submit button as listed in the controls section.
Question 220
Which client-side programming language can run a custom submit handler that compares two form fields and cancels submission when they disagree?
A. HTML
B. CSS
C. JavaScript
D. PHP
Hint / Module Reference (Where to Read)
Separate event dispatch, handler registration and cancellation of the browser default action.
JavaScript can run browser event handlers, inspect field values and call preventDefault when a custom validity check fails. This supports a comparison between fields before submission. HTML supplies native constraints such as required or type=email, but those constraints are not the custom scripted comparison requested. CSS controls presentation, and PHP processes server requests after submission rather than running the browser handler.
Evidence in the complete study note
For submission, form.addEventListener("submit",e=>{if(!valid()){e.preventDefault();}}) stops the default only on failure.WEB21
type=email/required give browser validation feedback; arbitrary clients can bypass it.WEB09
HTML supplies structure/meaning; CSS controls presentation; JavaScript supplies programmable interactivity.WEB01
PHP, Python, JSP/Java and ASP.NET applications generate server responses and access databases; C# is commonly used with ASP.NET.WEB01
Choice by choice
A · incorrect — HTML supplies native field constraints, but is not the programming language executing the custom comparison handler.
B · incorrect — CSS controls presentation rather than executing submit-handler logic.
C · correct — JavaScript executes the browser submit handler and can cancel the default submission on a failed comparison.
D · incorrect — PHP runs the server-side processing, not this browser event handler.
Question 221
Which description defines client-server roles without requiring a particular physical-machine arrangement?
A. Client and server must be the same physical machine
B. A client requests resources or services and a server receives requests and returns responses; they may share a machine
C. Any two different browser instances automatically form client and server roles
D. Any two pages on a website automatically form client and server roles
Hint / Module Reference (Where to Read)
Identify the role requested and compare it with the definitions and constraints in the cited passages.
Correct answer: B — A client requests resources or services and a server receives requests and returns responses; they may share a machine
Client and server describe interacting roles: the client requests a resource or service and the server handles the request and returns a response. These roles can run on separate machines or on the same machine. Physical location therefore does not define the relationship. Two browser instances or two web pages also do not automatically establish a request-serving role pair. The corrected definition focuses on behavior while retaining the deployment distinction as a distractor.
Evidence in the complete study note
A browser/user agent requests resources and renders HTML/CSS, then runs permitted JavaScript.WEB01
A web/HTTP server receives requests and returns representations, sometimes invoking application code.WEB01
Client and server are roles and can run on the same machine.WEB01
Choice by choice
A · incorrect — The roles can share a machine, but sameness is not required.
B · correct — This states the request/response roles and permits either physical arrangement.
C · incorrect — Two browser instances do not automatically make one a server.
D · incorrect — Different pages are resources, not automatically request and serving roles.
Question 222
A browser sends a GET request and the web server replies with a status code and resource representation. Which application-layer protocol gives this exchange its semantics?
A. HTTP
B. FTP
C. TCP/IP
D. SMTP
Hint / Module Reference (Where to Read)
Identify the role requested and compare it with the definitions and constraints in the cited passages.
GET and the returned status code belong to HTTP’s web request/response semantics. TCP/IP may carry that exchange, but it does not define the application method or response-status meaning. FTP and SMTP serve different application purposes. The scenario therefore identifies HTTP without depending on an unstated assumption about which networking layer is being tested.
Evidence in the complete study note
The Internet connects networks; the Web is a resource system commonly using HTTP.WEB01
HTTP defines web application requests, response status codes and representations.WEB-S14
An HTTP exchange can use underlying TCP connections and IP addresses; naming that network stack does not identify the application-level method or status semantics.WEB-S14
FTP is a file-transfer application protocol.WEB-S14
SMTP transports electronic mail.WEB-S14
Choice by choice
A · correct — HTTP defines GET requests, response status codes and resource representations.
B · incorrect — FTP does not define the stated web GET/status exchange.
C · incorrect — TCP/IP can carry the exchange but does not define its application-level GET or status semantics.
D · incorrect — SMTP is a mail-transfer application protocol, not the stated web request/response semantics.
Question 223
Which method in HTTP is used to retrieve a resource from a server?
A. GET
B. POST
C. PUT
D. DELETE
Hint / Module Reference (Where to Read)
Identify the protocol layer and the intended request, response or channel semantics.
WEB04 defines GET as retrieving a representation with safe semantics. That is the retrieval operation requested. POST asks a target to process supplied content, PUT creates or replaces the identified representation, and DELETE requests removal. These are intended method semantics; a badly designed server does not change which method the standard retrieval role belongs to.
Evidence in the complete study note
GET retrieves a representation with safe semantics; do not implement an intentional state-changing action as a GET link.WEB04
POST asks the target to process supplied content.WEB04
PUT creates/replaces the identified resource representation; DELETE requests removal of its association.WEB04
Choice by choice
A · correct — GET is the HTTP method whose intended semantics retrieve a resource representation.
B · incorrect — POST requests processing of supplied content rather than naming the standard safe retrieval operation.
C · incorrect — PUT creates or replaces an identified representation instead of simply retrieving it.
D · incorrect — DELETE requests removal of a resource association rather than reading its representation.
Question 224
Which method in HTTP is used to send data to a server for processing?
A. GET
B. POST
C. PUT
D. DELETE
Hint / Module Reference (Where to Read)
Identify the protocol layer and the intended request, response or channel semantics.
Correct answer: B — POST requests processing of supplied content.
WEB04 explicitly says POST asks the target to process supplied content, matching the intended HTTP method role. GET retrieves safely, PUT creates or replaces an identified representation, and DELETE removes an association. Those methods can carry protocol details, but the generic processing semantics in the stem are POST’s specific definition.
Evidence in the complete study note
GET retrieves a representation with safe semantics; do not implement an intentional state-changing action as a GET link.WEB04
POST asks the target to process supplied content.WEB04
PUT creates/replaces the identified resource representation; DELETE requests removal of its association.WEB04
Choice by choice
A · incorrect — GET’s intended semantics retrieve a representation rather than request arbitrary content processing.
B · correct — POST asks the target resource to process the supplied content.
C · incorrect — PUT specifies creating or replacing the identified representation rather than the generic processing role.
D · incorrect — DELETE requests removal of a resource association rather than the stated content-processing semantics.
Question 225
Which HTTP status code indicates a successful request?
A. 200
B. 300
C. 400
D. 500
Hint / Module Reference (Where to Read)
Identify the protocol layer and the intended request, response or channel semantics.
WEB04 explicitly maps 200 to success, 400 to a malformed request, and 500 to unexpected server failure. A 3xx code belongs to redirection rather than ordinary successful representation delivery. Therefore 200 is the listed status indicating a successful request. Other 2xx successes exist, but they are not among these options.
Evidence in the complete study note
200 indicates success, 201 creation, 204 success without content, 301 permanent redirection, 400 malformed request, 401 missing/invalid authentication, 403 refusal, 404 unavailable/not found, and 500 an unexpected server failure.WEB04
The first digit of an HTTP status code identifies its class: 2xx means successful handling, 3xx means redirection or further action, 4xx indicates a client-error condition, and 5xx indicates a server-error condition.WEB-S10
Choice by choice
A · correct — The note explicitly identifies 200 as a successful request status.
B · incorrect — A 3xx code represents redirection behavior rather than the listed ordinary success status.
C · incorrect — 400 indicates a malformed request, not successful processing.
D · incorrect — 500 indicates an unexpected server failure, not success.
Question 226
Which HTTP status code indicates that the requested resource is not found on the server?
A. 200
B. 300
C. 400
D. 404
Hint / Module Reference (Where to Read)
Identify the protocol layer and the intended request, response or channel semantics.
WEB04 explicitly identifies 404 as unavailable or not found. That directly matches the requested missing-resource case. The alternatives represent success, redirection, or a malformed request rather than the not-found status. A not-found response describes what is reported to the client; it does not require explaining every possible server-side reason for the absence.
Evidence in the complete study note
200 indicates success, 201 creation, 204 success without content, 301 permanent redirection, 400 malformed request, 401 missing/invalid authentication, 403 refusal, 404 unavailable/not found, and 500 an unexpected server failure.WEB04
The first digit of an HTTP status code identifies its class: 2xx means successful handling, 3xx means redirection or further action, 4xx indicates a client-error condition, and 5xx indicates a server-error condition.WEB-S10
Choice by choice
A · incorrect — 200 reports success rather than the missing-resource condition in the stem.
B · incorrect — 300 is a redirection-class code, not the note’s not-found status.
C · incorrect — 400 concerns a malformed request rather than the unavailable resource identified here.
D · correct — 404 is explicitly mapped to unavailable or not found in WEB04.
Question 227
Which situations demonstrate concurrency when their requests make overlapping progress? Here simultaneously means overlapping progress, not necessarily execution at the same instant. Select all that apply.
A. The ability of the server to handle multiple clients simultaneously
B. The ability of the client to handle multiple servers simultaneously
C. The ability of the server to handle multiple requests from a single client
D. The ability of the client to handle multiple requests to a single server
Hint / Module Reference (Where to Read)
Identify the execution side and communication pattern, keeping runtime, transport, data format and callback roles distinct.
Correct answers (select all): A, B, C, D — The ability of the server to handle multiple clients simultaneously; The ability of the client to handle multiple servers simultaneously; The ability of the server to handle multiple requests from a single client; The ability of the client to handle multiple requests to a single server
Concurrency means overlapping progress, whereas parallelism requires execution at the same instant. A server can overlap work for several clients or several requests from one client. A client can likewise overlap interactions with several servers or multiple requests to one server. The question explicitly supplies overlap for each situation, making every listed arrangement an example of concurrency without asserting that all work physically runs in parallel.
Evidence in the complete study note
Concurrency means overlapping progress; parallelism means execution at the same instant.WEB36
Multiple clients, or one client with overlapping requests, can both create concurrency.WEB36
Choice by choice
A · correct — Overlapping server work for several clients is concurrent.
B · correct — Overlapping client interactions with several servers are concurrent.
C · correct — Several overlapping requests from one client can create server concurrency.
D · correct — A client can overlap multiple requests to the same server.
Question 228
What is a race condition in the context of concurrency?
A. A condition where two or more clients compete to establish a connection with the server
B. A condition where two or more servers compete to respond to a client request
C. A condition where multiple threads or processes access shared resources in an unpredictable
manner
D. A condition where multiple clients send duplicate requests to the server
Hint / Module Reference (Where to Read)
Identify the shared-state invariant and the operations that must be coordinated.
Correct answer: C — Shared-resource correctness depends on execution interleaving.
WEB37 describes two requests reading stock one, both accepting a sale, and both writing zero. The final correctness depends on their interleaving, which is the race-condition mechanism captured most closely by C’s unpredictable shared-resource access. Competing connections, multiple responders, or duplicate requests are not themselves sufficient; they become races only when shared-state correctness depends on timing.
Evidence in the complete study note
Suppose two requests read a stock count1, both decide it is available and both write0: two sales consumed one item.WEB37
Correctness depends on interleaving, even if each callback has only a short synchronous body.WEB37
Choice by choice
A · incorrect — Competition to establish a connection is not by itself a shared-state correctness failure caused by interleaving.
B · incorrect — Several servers responding does not alone establish a race on shared mutable state.
C · correct — This is the closest option: shared-state access can make correctness depend on the execution interleaving.
D · incorrect — Duplicate requests can cause other problems, but duplication alone is not the defining race-condition mechanism.
Question 229
Which technique directly protects one shared-state critical section with an exclusive lock that does not rely on busy waiting? Choose the exclusive-lock primitive, rather than a bounded-access counter or a messaging design.
A. Mutex locks
B. Spinlocks
C. Semaphores
D. Message queues
Hint / Module Reference (Where to Read)
Identify the shared-state invariant and the operations that must be coordinated.
A mutex directly protects a critical section by allowing only one holder at a time. The question distinguishes that exclusive-lock abstraction from spinlock busy waiting, semaphore bounded-access counting and message-queue designs. A semaphore can also enforce exclusion when configured suitably, but it is not the specific exclusive-lock primitive requested. Choosing a primitive does not by itself guarantee application correctness: every conflicting update must use the protected critical section.
Evidence in the complete study note
A mutex protects one critical section; semaphores can coordinate bounded access; spinlocks busy-wait and are unsuitable for blocking a browser/event-loop thread.WEB37
Choice by choice
A · correct — A mutex is the requested exclusive-lock primitive.
B · incorrect — A spinlock relies on busy waiting, which the stem excludes.
C · incorrect — A semaphore is the bounded-access counter abstraction excluded by the requested category.
D · incorrect — A message queue is a messaging design rather than the requested lock primitive.
Question 230
In an asynchronous browser request, what is the response callback’s role?
A. A function invoked by the browser runtime or API when the response becomes available
B. A function that is called by the client to request a specific operation from the server
C. A function that is called by the server to handle concurrent client requests
D. A function that is called by the client to synchronize with the server
Hint / Module Reference (Where to Read)
Identify the execution side and communication pattern, keeping runtime, transport, data format and callback roles distinct.
Correct answer: A — A function invoked by the browser runtime or API when the response becomes available
The callback is registered for later invocation by the browser runtime or API when the response becomes available. The remote server sends response data; it does not directly execute the browser function. A function that starts a request or a server request-handler function has a different role in the described interaction. The answer states both the owning execution environment and the event that causes invocation.
Evidence in the complete study note
A callback is a function invoked later by the runtime/API.WEB34
The browser invokes its response handler when the response is available; the remote server does not directly execute browser code.WEB34
Choice by choice
A · correct — This states who invokes the browser response callback and when.
B · incorrect — Starting a request is not the response callback’s role.
C · incorrect — A server request handler is a different callback in a different environment.
D · incorrect — A callback need not perform client/server synchronization.
Question 231
Which application-level protocol provides a persistent bidirectional message channel after its handshake?
A. HTTP
B. FTP
C. TCP/IP
D. WebSocket
Hint / Module Reference (Where to Read)
Identify the execution side and communication pattern, keeping runtime, transport, data format and callback roles distinct.
WebSocket establishes a persistent bidirectional channel on which either endpoint can exchange messages after the handshake. HTTP requests can also be issued asynchronously, but asynchronous programming alone does not supply this specific channel model. FTP has a different transfer role, and TCP/IP names lower-level networking foundations rather than the requested application protocol. The revised interaction requirement therefore distinguishes WebSocket without claiming it is the only way to avoid blocking a client.
Evidence in the complete study note
WebSocket establishes a persistent bidirectional message channel after its handshake.WEB35
Either HTTP-based AJAX or WebSockets can support nonblocking user interaction and carry JSON, so generic questions may be nonexclusive.WEB35
HTTP defines web application requests, response status codes and representations.WEB-S14
An HTTP exchange can use underlying TCP connections and IP addresses; naming that network stack does not identify the application-level method or status semantics.WEB-S14
FTP is a file-transfer application protocol.WEB-S14
SMTP transports electronic mail.WEB-S14
Choice by choice
A · incorrect — Asynchronous HTTP requests do not by themselves define this persistent bidirectional message channel.
B · incorrect — FTP is not the specified WebSocket-style application messaging protocol.
C · incorrect — TCP/IP refers to lower-level networking rather than this application-level channel protocol.
D · correct — WebSocket supplies the described persistent bidirectional channel.
Question 232
What is long polling in client-server communication?
A. A technique where the server continuously sends updates to the client
B. A technique where the client continuously sends requests to the server for updates
C. A technique where the server holds a request from the client until new data is available
D. A technique where the client holds a request from the server until new data is available
Hint / Module Reference (Where to Read)
Identify the execution side and communication pattern, keeping runtime, transport, data format and callback roles distinct.
Correct answer: C — The server holds a client request until data is available or timeout occurs.
WEB35 defines long polling as holding a client request until an event or timeout, returning a response, and then reconnecting from the client. C captures that defining held-request step. It is not continuous unsolicited streaming on a finished response, repeated short polling without a held request, or a reversed arrangement in which a client holds a server-originated request.
Evidence in the complete study note
Short polling repeatedly requests updates.WEB35
Long polling holds one client request until an event or timeout, returns a response, then the client reconnects; it is not continuous unsolicited streaming on that same finished response.WEB35
Choice by choice
A · incorrect — Continuous unsolicited server updates describe streaming-like behavior rather than the held-request long-polling cycle.
B · incorrect — Repeated immediate polling requests describe short polling rather than holding each request until an event or timeout.
C · correct — Holding the client’s request until new data or timeout is the defining long-polling behavior.
D · incorrect — This reverses the roles; the server holds a request initiated by the client.
Question 233
Which programming language is commonly used for client-side scripting in web
programming?
A. HTML
B. CSS
C. JavaScript
D. PHP
Hint / Module Reference (Where to Read)
Identify the role requested and compare it with the definitions and constraints in the cited passages.
The JavaScript chapter identifies the browser behavior/scripting layer as JavaScript. HTML provides structure, CSS appearance and PHP server-side output. Evidence: PDF p. 44, PDF p. 60.
Evidence in the complete study note
HTML supplies structure/meaning; CSS controls presentation; JavaScript supplies programmable interactivity.WEB01
PHP, Python, JSP/Java and ASP.NET applications generate server responses and access databases; C# is commonly used with ASP.NET.WEB01
Choice by choice
A · incorrect — Markup rather than scripting.
B · incorrect — Stylesheet rather than scripting.
C · correct — Exact client scripting language.
D · incorrect — Explicit server-side language.
Question 234
Which protocol is commonly used for secure communication between a client and server?
A. HTTP
B. FTP
C. TCP/IP
D. HTTPS
Hint / Module Reference (Where to Read)
Identify the protocol layer and the intended request, response or channel semantics.
WEB05 defines HTTPS as HTTP over TLS with channel confidentiality, integrity, and certificate-based server authentication. It is the offered protocol for a protected web client/server exchange. Plain HTTP and the TCP/IP networking family do not supply those protections by themselves, and FTP is not the secure HTTP protocol being described. These protections do not replace application validation or authorization.
Evidence in the complete study note
HTTPS uses HTTP over TLS, protecting channel confidentiality/integrity and authenticating the server under certificate checks.WEB05
HTTP defines web application requests, response status codes and representations.WEB-S14
An HTTP exchange can use underlying TCP connections and IP addresses; naming that network stack does not identify the application-level method or status semantics.WEB-S14
FTP is a file-transfer application protocol.WEB-S14
SMTP transports electronic mail.WEB-S14
Choice by choice
A · incorrect — Plain HTTP lacks the TLS protections that distinguish secure web communication in WEB05.
B · incorrect — FTP is not the HTTPS protocol identified for TLS-protected web exchanges.
C · incorrect — TCP/IP supplies underlying networking rather than the specific protected HTTP channel requested.
D · correct — HTTPS adds TLS confidentiality, integrity, and checked server identity to HTTP communication.
Question 235
What is a load balancer in the context of client-server systems?
A. A device that balances the load between multiple clients
B. A device that balances the load between multiple servers
C. A device that balances the load between the client and server
D. A device that balances the load between different network protocols
Hint / Module Reference (Where to Read)
Identify the execution side and communication pattern, keeping runtime, transport, data format and callback roles distinct.
Correct answer: B — Distribute work across multiple server instances.
WEB36 says workers or processes and a load balancer distribute work across server instances. That directly supports B. The balancing target is the pool of servers handling incoming work, rather than clients, the two communication roles, or protocol types. The note also warns that distributing requests does not automatically coordinate shared data or session state.
Evidence in the complete study note
Workers/processes and a load balancer distribute work across server instances; they do not automatically coordinate shared data or session state.WEB36
Choice by choice
A · incorrect — The described load-balancing role distributes server work rather than balancing computational load among clients.
B · correct — A load balancer distributes incoming work across multiple server instances.
C · incorrect — It does not divide one application’s work equally between the abstract client and server roles.
D · incorrect — Balancing among network protocol types is not the server-instance distribution role defined in WEB36.
Question 236
Which browser-stored mechanism normally carries an opaque session identifier automatically on matching requests, without adding that token to each URL?
A. Cookies
B. HTML forms
C. URL parameters
D. Server-side caching
Hint / Module Reference (Where to Read)
Follow the identifier and server-side state through the stated lifecycle or access check; distinguish client-controlled claims from server decisions.
A cookie stores browser-side name/value data and is automatically attached to requests that match its scope and security rules. It can carry the opaque identifier used to find server-side session state. Forms or URL parameters can explicitly transmit identifiers, but do not provide the automatic matching-request behavior specified. Server-side caching stores server data rather than supplying this browser identifier carrier.
Evidence in the complete study note
Cookies are browser-held name/value data automatically attached to matching requests subject to domain, path, expiry, Secure and SameSite rules.WEB28
Normally the browser holds an opaque session identifier while data resides in server-controlled storage.WEB29
Protect session IDs, regenerate after login, expire appropriately and avoid putting sensitive tokens in URLs.WEB29
Choice by choice
A · correct — A matching cookie is automatically attached to requests and can carry the opaque session identifier.
B · incorrect — A form submits explicit values when submitted, rather than automatically attaching stored data to all matching requests.
C · incorrect — A URL parameter must be included in a URL; the scenario explicitly keeps the token out of URLs.
D · incorrect — Server caching concerns retained server-side data, not the browser mechanism that automatically carries the identifier.
Question 237
What is AJAX in web programming?
A. A programming language for server-side scripting
B. A database management system
C. A technique for asynchronous client-server communication
D. A web server software
Hint / Module Reference (Where to Read)
Identify the execution side and communication pattern, keeping runtime, transport, data format and callback roles distinct.
Correct answer: C — A technique for asynchronous client-server communication
AJAX is a web-development technique with asynchronous server communication and page updates without refresh. It combines technologies instead of being a server language, database system or server software. Evidence: PDF p. 89.
Evidence in the complete study note
AJAX means Asynchronous JavaScript and XML, but responses can be JSON, text, HTML or XML.WEB34
It is a technique, not a language, standalone framework or mandatory XML protocol.WEB34
Choice by choice
A · incorrect — Not the module classification.
B · incorrect — Not the module classification.
C · correct — Exact asynchronous communication technique.
D · incorrect — Not the module classification.
Question 238
What is a RESTful API?
A. An API that supports real-time communication between client and server
B. An API that uses the REST architectural style for client-server communication
C. An API that only supports server-to-server communication
D. An API that is used for database management
Hint / Module Reference (Where to Read)
Identify the protocol layer and the intended request, response or channel semantics.
Correct answer: B — An API following the REST architectural style.
WEB05 describes REST through client/server separation, stateless requests, cacheability, and a uniform resource interface. B is the definition matching those architectural constraints. Real-time delivery is not required, server-to-server-only use is not a REST limitation, and database management is only a possible implementation domain. Returning JSON alone also does not establish REST.
Evidence in the complete study note
A RESTful API follows constraints such as client/server separation, stateless requests, cacheability and a uniform resource interface.WEB05
Resources have identifiers and representations; JSON is common but not required.WEB05
Choice by choice
A · incorrect — Real-time communication is not the defining constraint or requirement of a RESTful API.
B · correct — Following REST architectural constraints is what makes an API RESTful.
C · incorrect — REST is not restricted to server-to-server communication; browsers can access resource interfaces too.
D · incorrect — Database management is one possible domain, not the architectural definition of REST.
Question 239
What is server-side caching in client-server systems?
A. A technique to store client-side data on the server
B. A technique to store server-side data on the client
C. A technique to store frequently accessed server-side data in memory for faster retrieval
D. A technique to store client and server data in a separate cache server
Hint / Module Reference (Where to Read)
Distinguish the purpose of each development or performance technique from its possible side effects.
Correct answer: C — Retain frequently accessed server-side results for faster reuse.
WEB39 describes caching as reusing a representation or result and explicitly gives server caching of rendered pages or expensive query results. C matches that faster-retrieval purpose. The cache need not be a separate server, and merely transferring client data to a server or server data to a client is not the defining reuse mechanism. Validity, privacy, and cache keys still matter.
Evidence in the complete study note
Caching reuses a representation/result and requires validity/invalidation rules.WEB39
Server caching can hold rendered pages or expensive query results; never share private user content under an unsafe common key.WEB39
Choice by choice
A · incorrect — Storing client-originated data on a server does not by itself establish result reuse or caching.
B · incorrect — Placing server data on a client describes client-side storage rather than server-side caching.
C · correct — Retaining frequently reused server-side results avoids repeated work and accelerates later retrieval.
D · incorrect — A separate cache server is optional; the defining property is reusable results, not a mandatory deployment topology.
Question 240
Which form METHOD value normally places submitted name/value pairs in the request body rather than the URL query?
A. GET
B. INPUT
C. ACTION
D. POST
Hint / Module Reference (Where to Read)
Separate the control role, displayed content, submitted value and form destination.
For ordinary HTML forms, GET usually puts successful name/value pairs in the URL query, while POST places form data in the request body. METHOD does not specify an element-at-a-time parser; parsing depends on encoding and the receiving implementation. INPUT is a control element name and ACTION is a form attribute, so neither is a method value. The corrected question tests the supported form-submission distinction rather than the unsupported parsing premise.
Evidence in the complete study note
GET forms usually put name/value pairs in the URL query; POST forms put them in the body.WEB04
A form’s action identifies its processing URL, method its submission method, and enctype its encoding.WEB09
Choice by choice
A · incorrect — GET normally places the pairs in the URL query.
B · incorrect — INPUT names a control element rather than a METHOD value.
C · incorrect — ACTION identifies a separate form attribute rather than a METHOD value.
D · correct — POST normally puts submitted form data in the request body.
Question 241
Which claim is false about HTML as an open-standard text markup format?
A. It supports interoperability, though feature support varies across platforms and browsers
B. Its text can be transmitted over a network as a web representation
C. Its source represents document structure using text markup rather than requiring a fixed small file size
D. Because it is proprietary technology
Hint / Module Reference (Where to Read)
Use the element or attribute meaning and document structure, rather than appearance or a similar-looking name.
Correct answer: D — Because it is proprietary technology
HTML supplies document structure in a text markup representation within the open Web standards setting. That supports interoperability but does not guarantee identical feature support in every browser, a tiny document size or a fixed transfer speed. The alternatives remove those universal promises. Calling HTML proprietary contradicts the stated open-standard setting, while the other choices now make qualified claims about its representation and delivery.
Evidence in the complete study note
Open standards do not guarantee identical support for every feature in every browser.WEB02
HTML means HyperText Markup Language.WEB06
Choice by choice
A · incorrect — Qualified interoperability is consistent with differing feature support.
B · incorrect — A web representation can transmit HTML text without promising a fixed speed.
C · incorrect — Text markup expresses structure without guaranteeing a small size.
D · correct — The proprietary characterization conflicts with the open-standard setting.
Question 242
What is the output of the following JavaScript fragment? for (n = 1; n < 7; n++) { if (n % 5 == 0) {
document.write(n + " is multiple of 5"); } }
A. 5 is multiple of 5
B. 1 2 3 4 5 is multiple of 5 6
C. 5 is multiple of 5 6 7
D. 1 2 3 4 5 6
Hint / Module Reference (Where to Read)
Identify the role requested and compare it with the definitions and constraints in the cited passages.
The loop starts at 1 and visits integers 1 through 6 because n<7 excludes 7. The p.49 arithmetic table shows % as remainder, including 8%3=2. Among these values only 5 has remainder zero on division by 5, so the conditional writes once: 5 is multiple of 5. This uses the conventional n++ loop step; the module shows for begin/condition/step but does not separately define postfix value semantics, which are immaterial because the step value is discarded. Evidence: PDF p. 49, PDF p. 49, PDF p. 50, PDF p. 47.
Evidence in the complete study note
for(initialization;test;update) initializes once, checks before each iteration, then updates after each body.WEB19
For nonnegative integers n and positive d, n % d gives the remainder after division; zero tests divisibility.WEB-S13
Choice by choice
A · correct — Exactly the single matching value 5.
B · incorrect — Prints values outside the if branch; no unconditional write exists.
C · incorrect — Adds 6 and 7 even though 6 fails and 7 is excluded.
D · incorrect — Ignores the conditional and omits the literal message.
Question 243
In an ordinary browser page, which statements about document.write("Hello World") are true? Classify properties and values inclusively: a method is also a function-valued property. Select all that apply.
A. write is a property
B. write is a method
C. document is a property
D. write is an object
Hint / Module Reference (Where to Read)
Track the value and type at each operation, applying the stated conversion, indexing or mathematical rule.
Correct answers (select all): A, B, C, D — write is a property; write is a method; document is a property; write is an object
document.write is a method and also a function-valued property of document. In a normal browser page, document is exposed as a property of window. Functions are objects in JavaScript, so the write function value is also an object. These descriptions are compatible views of the same expression rather than mutually exclusive categories. All four statements are therefore true under the explicit inclusive-classification convention.
Evidence in the complete study note
In a normal browser page, window exposes the browsing context and document is its document property.WEB22
document.write is a method/function property; writing after document load can replace the document.WEB22
JavaScript primitives are undefined, null, Boolean, Number, BigInt, String and Symbol; objects include arrays, functions and dates.WEB16
Choice by choice
A · correct — write is a function-valued property of document.
B · correct — Calling that function through document is a method invocation.
C · correct — document is the browsing context’s document property.
D · correct — The write function value is an object because JavaScript functions are objects.
Question 244
Consider
nav ul {
list-style-type: none;
margin: 0;
padding: 0;
}
What problem does this solve when creating a navigation bar?
A. Removes bullet points and default spacing, allowing custom layout
B. Aligns the navbar to the right of the page
C. Adds hover effects to list items
D. Converts the list into a dropdown menu
Hint / Module Reference (Where to Read)
Use the element or attribute meaning and document structure, rather than appearance or a similar-looking name.
Correct answer: A — Remove list bullets and default margin/padding.
This rule resets navigation-list styling. list-style-type:none removes markers, and zero margin/padding removes default list spacing. None of those declarations specifies alignment, hover styling, or dropdown behavior. Thus A describes the actual effect, leaving layout and interaction to additional rules.
Evidence in the complete study note
Resetting nav ul with list-style-type:none; margin:0; padding:0 removes bullets and default spacing only; it does not itself arrange links horizontally or create a dropdown.WEB08
Choice by choice
A · correct — These declarations remove markers and default spacing so later layout rules can start from a clean list.
B · incorrect — No text alignment, flex justification, or positioning rule aligns the navbar right.
C · incorrect — No :hover selector or hover-specific declaration is present.
D · incorrect — A dropdown needs additional layout and interaction rules, not just this reset.
Question 245
Which PHP superglobal is dedicated to URL query parameters, excluding configurable combined-source arrays?
A. $_REQUEST
B. $_POST
C. $_GET
D. isset()
Hint / Module Reference (Where to Read)
Identify the data source or security responsibility precisely, and check whether a combined source or a different control could also qualify.
$_GET is the dedicated query-parameter source. $_REQUEST can also contain GET values depending on configuration, but it is a combined-source array and is explicitly excluded by this question. $_POST represents supported form POST data, while isset tests existence and non-null rather than acting as an input-data container. Removing placeholder brackets makes the array names clear without inventing a particular field name or request value.
Evidence in the complete study note
$_GET contains query parameters; $_POST contains supported form POST data; $_FILES upload metadata; $_SERVER request/environment details; $_COOKIE cookie values; $_SESSION session data after startup.WEB27
$_REQUEST may combine GET/POST/cookie data according to configuration; it is not a database interface and has ambiguous precedence, so prefer the intended source.WEB27
isset tests existence and non-null, not truth or valid syntax.WEB27
Choice by choice
A · incorrect — This combines configured request sources rather than being dedicated to query parameters.
B · incorrect — This is the supported form POST source.
C · correct — This is the dedicated URL-query source.
D · incorrect — This tests whether a variable or entry exists and is non-null.
Question 246
____________is a service that allows organizations and individuals to post a website or a
web page onto the Internet.
A. Web hosting
B. Internet service provider
C. Web client
D. Domain name registration
Hint / Module Reference (Where to Read)
Identify the role requested and compare it with the definitions and constraints in the cited passages.
WEB02 defines hosting as supplying the environment where a website is served. This is the service enabling an organization’s site or page to be made available online. An ISP supplies connectivity, domain registration reserves a name, and a web client requests resources. Those supporting roles are not the hosting service described.
Evidence in the complete study note
Hosting supplies an environment where a site is served; domain registration reserves a name, and DNS maps names to network records.WEB02
An ISP provides connectivity.WEB02
Choice by choice
A · correct — Hosting supplies an environment in which the site is served to users.
B · incorrect — An ISP provides connectivity rather than necessarily the environment serving the website.
C · incorrect — A web client requests resources instead of providing the publishing environment.
D · incorrect — Domain registration reserves a name rather than serving the site’s content.
Question 247
Which protocol is mostly used for communication between client and server in a web
application?
A. FTP
B. SMTP
C. HTTP
D. SSH
Hint / Module Reference (Where to Read)
Identify the protocol layer and the intended request, response or channel semantics.
WEB01 describes the Web as a resource system commonly using HTTP, and WEB03 details its request/response exchange. HTTPS adds TLS protection to HTTP but does not make one of the other offered protocols the ordinary web exchange. Among these choices, HTTP is the application protocol used to request and return web resources.
Evidence in the complete study note
The Internet connects networks; the Web is a resource system commonly using HTTP.WEB01
An HTTP/1.1 request begins with method, request-target and version, followed by header fields, a blank line, and an optional body.WEB03
HTTP defines web application requests, response status codes and representations.WEB-S14
An HTTP exchange can use underlying TCP connections and IP addresses; naming that network stack does not identify the application-level method or status semantics.WEB-S14
FTP is a file-transfer application protocol.WEB-S14
SMTP transports electronic mail.WEB-S14
Choice by choice
A · incorrect — FTP is not the HTTP request/response web protocol described in the note.
B · incorrect — SMTP is not the webpage request/response protocol developed in WEB03.
C · correct — HTTP carries the web resource requests and responses described in the complete note.
D · incorrect — SSH is not the ordinary webpage request/response protocol identified here.
Question 248
What is the extension of JavaScript file?
A. .javaS
B. .JS
C. .java
D. CSS
Hint / Module Reference (Where to Read)
Check exact language syntax, declaration rules and execution context before reasoning about the result.
Correct answer: B — .js is the conventional JavaScript source extension.
WEB15 uses an external app.js script and explicitly calls it a .js file. B identifies that extension family despite its uppercase printed letters. Actual filename case must match the deployed resource where paths are case-sensitive; the conventional spelling is lowercase .js. The other choices name different or invented file extensions rather than JavaScript source.
Evidence in the complete study note
Use <script src="app.js"></script> for an external .js file; script content has no HTML closing-tag syntax inside its JavaScript source.WEB15
JavaScript originated at Netscape; it is distinct from Java and supports sophisticated applications through prototype-based objects and first-class functions.WEB15
Choice by choice
A · incorrect — The invented .javaS suffix is not the conventional .js extension specified by WEB15.
B · correct — This identifies the JS extension; use conventional lowercase .js and preserve actual filename case in paths.
C · incorrect — .java is not the .js source-file extension used for JavaScript in the note.
D · incorrect — CSS identifies stylesheet source rather than the JavaScript file extension.
Question 249
A web application has two protected endpoints. The profile endpoint checks a valid session identifier and its server-side user record on every request. The transfer endpoint grants access whenever the editable logged_in cookie equals 1 and ignores session validation. An unauthenticated attacker has no valid session and sets logged_in=1. Which result follows from these access checks?
A. The cookie edit can bypass the transfer endpoint, but does not grant access to the profile endpoint
B. The cookie edit grants access to both endpoints because both receive the same cookie
C. Neither endpoint can be bypassed unless the attacker first obtains a genuine session identifier
D. HTTPS alone prevents either endpoint from accepting a forged logged_in value
Hint / Module Reference (Where to Read)
Follow the identifier and server-side state through the stated lifecycle or access check; distinguish client-controlled claims from server decisions.
Correct answer: A — The cookie edit can bypass the transfer endpoint, but does not grant access to the profile endpoint
The two endpoints use different trust paths. The transfer endpoint trusts an attacker-controlled flag, so the forged value satisfies its stated access check without a valid session. The profile endpoint requires authenticated server-side state, which the attacker lacks, so the unrelated cookie does not grant access there. HTTPS protects transport rather than validating the truth of a client-generated login claim. The bypass therefore affects the transfer endpoint only.
Evidence in the complete study note
A client cookie logged_in=1 is attacker-controlled.WEB29
If the server trusts it alone, authorization can be bypassed.WEB29
If the server checks a valid session ID and its server-side user/role on every protected action, editing that unrelated flag does not grant rights.WEB29
HTTPS does not make client-generated claims trustworthy.WEB29
Choice by choice
A · correct — Only the transfer endpoint relies solely on the forgeable flag; the profile endpoint still requires a valid session.
B · incorrect — Receiving the same cookie does not make the endpoints apply the same authorization rule.
C · incorrect — The transfer check requires no genuine session identifier, so stealing one is unnecessary for that bypass.
D · incorrect — HTTPS does not prevent a client from submitting a false authorization flag.
Question 250
Why should form <input> elements include an associated <label> with the for attribute?
A. It enables offline form storage
B. It encrypts user data
C. It increases form submission speed
D. It improves accessibility: screen readers announce the label when the input is focused
Hint / Module Reference (Where to Read)
Separate the control role, displayed content, submitted value and form destination.
Correct answer: D — Provide an accessible label associated with the input.
WEB09 links a label’s for to the control id, and WEB07 requires programmatic control labels. That association lets assistive technology identify the input and announce its label. It does not alter storage, encryption, or network submission speed. D states the accessibility purpose directly, rather than confusing it with unrelated browser or transport features.
Evidence in the complete study note
A label’s for matches the control’s id; name identifies its submitted field.WEB09
Give controls programmatic labels, clear link text and keyboard access; visual styling alone does not establish accessibility.WEB07
Choice by choice
A · incorrect — Label association does not create offline storage for form values.
B · incorrect — Labels do not encrypt data or replace HTTPS transport protection.
C · incorrect — Associating a label does not accelerate form submission over the network.
D · correct — The programmatic label identifies the focused input for screen readers and other assistive technology.
Question 251
What is the difference between GET and POST methods? When would you use each?
Hint / Module Reference (Where to Read)
Identify the protocol layer and the intended request, response or channel semantics.
Answer: GET retrieves safely and usually places form values in the query; POST asks the target to process body content.
WEB04 recommends GET for reading representations rather than intentional state changes. POST suits submitted processing or actions such as enrollment with proper authorization and CSRF controls. Neither method encrypts data; use HTTPS for channel protection. POST body values remain visible to tools and subject to configured size limits rather than becoming secret or unlimited.
Evidence in the complete study note
GET retrieves a representation with safe semantics; do not implement an intentional state-changing action as a GET link.WEB04
POST asks the target to process supplied content.WEB04
GET forms usually put name/value pairs in the URL query; POST forms put them in the body.WEB04
For an enrollment action use POST with CSRF controls, server authorization, capacity checks and a transaction; show success only after commit.WEB40
Question 252
Why is client-side validation alone not enough for security?
Hint / Module Reference (Where to Read)
Separate event dispatch, handler registration and cancellation of the browser default action.
Answer: Clients can bypass or alter browser checks, so the server must validate and authorize again.
WEB27 requires server checks for required fields, type, length, and range, plus authentication and authorization before processing. Browser validation improves feedback but arbitrary clients can submit different requests. Bind SQL values and encode output for its context as well; encryption or merely connecting to a database does not replace these application controls.
Evidence in the complete study note
Read input, check required fields/type/length/range, authenticate and authorize, then process.WEB27
Bind SQL parameters to keep values separate from commands.WEB27
Encode output for HTML/attribute/JS context; textContent handles plain browser text.WEB27
Browser checks improve feedback; repeat validation and authorization on the server.WEB21
Question 253
What is the DOM and why is it important for web development?
Hint / Module Reference (Where to Read)
Track which node is selected or created, and distinguish changing content from attaching a node.
Answer: The DOM is the document’s node hierarchy, enabling scripts to inspect and update page content and behavior.
WEB20 selects nodes, creates elements, and attaches them to that hierarchy. Creating a node does not itself insert it, and missing lookups must be guarded. textContent safely inserts untrusted plain text, whereas innerHTML reparses markup and can replace descendant state. The DOM connects document structure to interactive browser updates.
Evidence in the complete study note
The DOM is a hierarchy of nodes representing the document.WEB20
Creation alone does not insert it.WEB20
innerHTML parses/replaces descendants, so += reparses/replaces the prior descendant content too and can destroy listeners/state.WEB20
Use textContent for untrusted plain text.WEB20
Question 254
A user closes their browser and reopens it. They are still logged in. How is this possible?
Hint / Module Reference (Where to Read)
Follow the identifier and server-side state through the stated lifecycle or access check; distinguish client-controlled claims from server decisions.
Answer: A persistent remember/session token or browser restoration can preserve the login flow.
WEB28 says reopening while logged in may use persistent session or remember tokens or browser restoration. The browser can retain an identifier, but the server still has to accept and validate it against its authorization state. Local persistence alone is not proof of authenticated access, and the observation does not identify one unique storage mechanism.
Evidence in the complete study note
Being logged in after reopening may use a persistent session/remember token or browser restoration; storage alone does not prove server acceptance.WEB28
If the server checks a valid session ID and its server-side user/role on every protected action, editing that unrelated flag does not grant rights.WEB29
Question 255
Why would a developer choose local storage over cookies?
Hint / Module Reference (Where to Read)
Identify the role requested and compare it with the definitions and constraints in the cited passages.
Answer: localStorage persists origin data without automatically attaching it to every matching request.
WEB28 contrasts localStorage’s persistent strings with cookies’ automatic request transmission. It can avoid transmitting data needed only by the client. JavaScript can still send stored tokens explicitly, so localStorage is not inherently incapable of session designs. Script-access risks and persistence policies must be considered; neither mechanism is universally preferable for sensitive authentication data.
Evidence in the complete study note
localStorage persists origin-specific string values across sessions until removed/cleared; sessionStorage is scoped to a page session/tab.WEB28
Neither is automatically transmitted like matching cookies, but JavaScript can send stored data explicitly.WEB28
Thus all four are client storage techniques, and localStorage can participate in token-based session designs, with script-access risks.WEB28
Question 256
What does HTML stand for?
A. Hyper Text Markup Language
B. High Tech Modern Language
C. Hyper Transfer Markup Language
D. Home Tool Markup Language
Hint / Module Reference (Where to Read)
Use the element or attribute meaning and document structure, rather than appearance or a similar-looking name.
WEB06 directly expands HTML as HyperText Markup Language. The name identifies markup used for document structure and meaning rather than a general programming or transfer protocol. The other phrases substitute different words and are not the expansion in the note. This vocabulary answer does not depend on a browser version or an implementation choice.
Evidence in the complete study note
HTML means HyperText Markup Language.WEB06
Choice by choice
A · correct — Hyper Text Markup Language matches the note’s expansion, with only spacing variation in HyperText.
B · incorrect — High Tech Modern Language is not the expansion given in WEB06.
C · incorrect — Transfer replaces the required word Text and gives the wrong expansion.
D · incorrect — Home Tool Markup Language is not the HTML expansion in the note.
Question 257
Which HTML tag creates a hyperlink?
A. <link>
B. <href>
C. <a>
D. <url>
Hint / Module Reference (Where to Read)
Identify which elements a rule targets and distinguish selector syntax from declaration syntax.
WEB07 gives <a href="page.html">Read</a> as the link pattern. The anchor element creates the user-facing hyperlink; href is its destination attribute, not a standalone tag. link is used for relationships such as external stylesheets, and url is not the anchor element. Thus C names the correct element among the supplied choices.
Evidence in the complete study note
Use <a href="page.html">Read</a> for a link; href is the destination, not url/link.WEB07
An external sheet uses <link rel="stylesheet" href="styles.css"> in head; an internal sheet uses style; an inline declaration uses an element’s style attribute.WEB11
Choice by choice
A · incorrect — link is used for resource relationships such as external stylesheets rather than the shown user-facing anchor.
B · incorrect — href is an attribute on an anchor, not the hyperlink element itself.
C · correct — The anchor element with href creates the hyperlink described in WEB07.
D · incorrect — url is not the supported HTML anchor tag.
Question 258
What is the correct HTML tag for inserting a line break?
A. <break>
B. <lb>
C. <br>
D. <newline>
Hint / Module Reference (Where to Read)
Use the element or attribute meaning and document structure, rather than appearance or a similar-looking name.
<br> creates a line break, <p> defines a paragraph, and <hr> represents a thematic break. C is the defined break element; the other options invent element names not defined as HTML elements. A line break is an HTML structure operation rather than a requirement to insert a physical newline into the source file.
Evidence in the complete study note
<p> marks paragraphs; <br> is a line break and <hr> a thematic break.WEB06
Choice by choice
A · incorrect — break is not the HTML line-break element defined in WEB06.
B · incorrect — lb is not the supported line-break element spelling.
C · correct — br is explicitly the HTML line-break element.
D · incorrect — newline is not the HTML line-break element defined in the note.
Question 259
Which tag preserves whitespace and line breaks exactly as written?
A. <p>
B. <pre>
C. <code>
D. <em>
Hint / Module Reference (Where to Read)
Use the element or attribute meaning and document structure, rather than appearance or a similar-looking name.
WEB06 gives <pre> the whitespace-preservation role. It is therefore the appropriate element for text whose source spaces and line breaks should be retained. code marks code semantics but does not itself guarantee preformatted whitespace, while paragraph and emphasis elements have other meanings. Custom CSS can alter defaults, but the question concerns the native tag role.
Evidence in the complete study note
<pre> preserves source whitespace; <code> marks code.WEB06
<strong> indicates importance and <em> stress; <b>/<i> have other text semantics and are not identical to importance/emphasis.WEB06
Choice by choice
A · incorrect — A paragraph does not itself preserve all source spacing and line breaks.
B · correct — pre is the element explicitly defined to preserve source whitespace.
C · incorrect — code marks code semantics; preformatted whitespace preservation is a separate role.
D · incorrect — em expresses stress emphasis rather than preformatted source layout.
Question 260
What is the highest-level heading tag in HTML?
A. <h6>
B. <heading>
C. <h0>
D. <h1>
Hint / Module Reference (Where to Read)
Use the element or attribute meaning and document structure, rather than appearance or a similar-looking name.
WEB06 defines heading levels h1 through h6 as a hierarchy. h1 is the highest level and h6 the lowest, regardless of CSS choices that can change their visual size. heading and h0 are not the defined heading-level tags. The answer is semantic rank, not whichever text happens to be styled largest.
Evidence in the complete study note
Heading levels h1–h6 express hierarchy, with h6 conventionally smallest in default styling, not a mandatory CSS size.WEB06
Choice by choice
A · incorrect — h6 is the lowest of the defined heading levels, not the highest.
B · incorrect — heading is not one of the defined h1–h6 heading-level tags.
C · incorrect — h0 is outside the defined heading levels in WEB06.
D · correct — h1 is the highest semantic heading level in the h1–h6 hierarchy.
Question 261
Which element is the root element of an HTML page?
A. <head>
B. <body>
C. <html>
D. <root>
Hint / Module Reference (Where to Read)
Use the element or attribute meaning and document structure, rather than appearance or a similar-looking name.
WEB06 explicitly identifies html as the document root, with head holding metadata and body containing document content. Those two elements are inside the document rather than replacing its root. root is not the HTML tag used for this role. Thus the root-element question directly selects C.
Evidence in the complete study note
<!DOCTYPE html> selects modern standards mode; <html> is the document root, <head> holds metadata, and <body> contains document content.WEB06
Choice by choice
A · incorrect — head holds metadata and is not the document root.
B · incorrect — body holds document content but is not the document’s root element.
C · correct — html is explicitly defined as the document root in WEB06.
D · incorrect — root is not the HTML root tag given here.
Question 262
Which attribute provides alternative text for an image?
A. title
B. src
C. alt
D. caption
Hint / Module Reference (Where to Read)
Use the element or attribute meaning and document structure, rather than appearance or a similar-looking name.
WEB07 gives img a src for its resource and alt for alternative text. Informative images need meaningful alternatives; decorative ones use empty alt. A title is not a replacement for alt, and a caption is separate visible context rather than the requested attribute. Therefore C names the accessibility text attribute.
Evidence in the complete study note
<img src="photo.jpg" alt="Students in a lab"> supplies source and alternative text.WEB07
Use empty alt for purely decorative images; informative images need meaningful alternatives.WEB07
Width/height reserve dimensions; title is not a replacement for alt.WEB07
Choice by choice
A · incorrect — title is not a replacement for the image’s alternative-text attribute.
B · incorrect — src identifies the image resource rather than its alternative text.
C · correct — alt supplies the image’s alternative text, or an empty value for purely decorative images.
D · incorrect — caption is not the requested image alternative-text attribute.
Question 263
What does target="_blank" do in a link?
A. Opens the link in the same window
B. Opens the link in a new tab or window
C. Closes the current window
D. Opens the link in a parent frame
Hint / Module Reference (Where to Read)
Use the element or attribute meaning and document structure, rather than appearance or a similar-looking name.
Correct answer: B — Open a new browsing context, commonly a new tab or window.
WEB07 maps _blank to a new context, _self to current, and _parent to parent. Browser preferences decide tab versus window, so B correctly allows either. The target does not close the current window or select the parent frame. This is a browsing-context request rather than a guaranteed window-management UI behavior.
Evidence in the complete study note
target="_self" uses the current context, _blank a new context, _parent its parent and _top the top-level context.WEB07
Browser preferences determine tab versus window.WEB07
Choice by choice
A · incorrect — The current context is selected by _self rather than _blank.
B · correct — _blank requests a new context, with tab versus window determined by browser behavior.
C · incorrect — The target does not request that the current window be closed.
D · incorrect — The parent context is selected by _parent rather than _blank.
Question 264
Which HTML tag is used for an unordered list?
A. <ol>
B. <li>
C. <ul>
D. <list>
Hint / Module Reference (Where to Read)
Use the element or attribute meaning and document structure, rather than appearance or a similar-looking name.
WEB08 defines ul as unordered and ol as ordered, with li items inside either. C therefore supplies the requested container. li is only an item, and list is not the defined HTML list-container name. Presentation of markers can be changed with CSS without changing whether the element is the unordered-list structure.
Evidence in the complete study note
Unordered <ul> and ordered <ol> contain <li> items.WEB08
Choice by choice
A · incorrect — ol is an ordered-list container, not the unordered-list container requested.
B · incorrect — li marks an item inside a list rather than the list container itself.
C · correct — ul is explicitly the unordered-list container in WEB08.
D · incorrect — list is not the unordered-list element spelling defined here.
Question 265
What HTML tag defines a table row?
A. <td>
B. <th>
C. <table>
D. <tr>
Hint / Module Reference (Where to Read)
Use the element or attribute meaning and document structure, rather than appearance or a similar-looking name.
WEB08 distinguishes the table element, row elements, and header/data cells. tr defines one row, while th and td are cells placed within rows. table contains the complete tabular structure. Therefore D is the row tag, independent of how many columns or spans the cells in that row occupy.
Evidence in the complete study note
<table> contains rows <tr>, header cells <th> and data cells <td>; a td is not the table itself.WEB08
Choice by choice
A · incorrect — td defines a data cell, not the containing row.
B · incorrect — th defines a header cell, not the containing row.
C · incorrect — table defines the whole table rather than one row.
D · correct — tr is the table-row element explicitly identified in WEB08.
Question 266
What does the colspan attribute do in a table?
A. Sets the column color
B. Merges cells across multiple columns
C. Sets the column width
D. Merges cells across multiple rows
Hint / Module Reference (Where to Read)
Use the element or attribute meaning and document structure, rather than appearance or a similar-looking name.
Correct answer: B — Make one cell span multiple columns.
WEB08 explicitly distinguishes colspan from rowspan. colspan allocates a cell across columns, often described informally as merging cells horizontally; it does not change a column’s color or width rule. rowspan is the vertical counterpart across rows. B therefore matches, while actual placement must still account for positions already occupied by spans.
Evidence in the complete study note
colspan spans columns; rowspan spans rows.WEB08
Account for occupied cells before placing the next cell, and use header associations for accessible data.WEB08
Choice by choice
A · incorrect — Column color is a styling concern rather than the colspan structural span.
B · correct — colspan makes one cell occupy positions across multiple columns.
C · incorrect — Column width is not the meaning of the colspan count.
D · incorrect — Spanning rows is rowspan, not colspan.
Question 267
Which meta tag is used for responsive design on mobile devices?
A. <meta name="keywords">
B. <meta name="robots">
C. <meta name="description">
D. <meta name="viewport">
Hint / Module Reference (Where to Read)
Identify the requested presentation effect and layout context before matching the property or rule.
WEB06 gives viewport metadata control over mobile viewport behavior, and WEB14 includes it alongside flexible layout and media queries for responsive design. Keywords and description concern metadata for content/discoverability, while robots concerns crawler directives. The viewport entry is the relevant mobile-layout metadata; it does not replace responsive CSS by itself.
Evidence in the complete study note
Meta charset declares encoding; description summarizes the page; viewport controls mobile viewport behavior.WEB06
Responsive design combines flexible layout, images, viewport metadata and media queries, for example @media(max-width:600px){.cards{grid-template-columns:1fr}}.WEB14
The keywords metadata name supplies terms relevant to the page, while description supplies a page summary.WEB-S12
Robots metadata supplies crawler indexing or search-presentation instructions.WEB-S12
Choice by choice
A · incorrect — Keywords metadata does not configure the mobile viewport used for responsive layout.
B · incorrect — Robots metadata concerns crawler handling rather than the mobile viewport.
C · incorrect — Description summarizes the page rather than controlling mobile viewport behavior.
D · correct — Viewport metadata configures mobile viewport behavior as part of responsive design.
Question 268
Which CSS selector targets an element with id="logo"?
A. .logo
B. logo
C. *logo
D. #logo
Hint / Module Reference (Where to Read)
Identify which elements a rule targets and distinguish selector syntax from declaration syntax.
WEB11 explicitly uses #logo as an ID selector and .notice as a class selector. Thus an element whose id is logo is targeted with #logo. A bare logo would be a type selector for an element named logo, while the starred concatenation is not the stated ID syntax. D is the correct selector.
Evidence in the complete study note
Type p selects paragraph elements, .notice selects a class, #logo an ID, h1,h2 groups selectors, nav ul selects descendants and nav>ul direct children.WEB11
Choice by choice
A · incorrect — .logo targets a class named logo rather than id="logo".
B · incorrect — Bare logo is a type selector, not the ID selector requested.
C · incorrect — *logo is not the defined CSS ID-selector syntax.
D · correct — #logo is the explicit ID-selector pattern supplied in WEB11.
Question 269
Which CSS selector targets all elements with class="highlight"?
A. #highlight
B. .highlight
C. *highlight
D. highlight
Hint / Module Reference (Where to Read)
Identify which elements a rule targets and distinguish selector syntax from declaration syntax.
WEB11 gives a dot-prefixed name as a class selector and a hash-prefixed name as an ID selector. Applying that rule to highlight yields .highlight. A bare word selects element type, and *highlight is not the supported class syntax. The class rule can match every element carrying that class, rather than only one unique ID.
Evidence in the complete study note
Type p selects paragraph elements, .notice selects a class, #logo an ID, h1,h2 groups selectors, nav ul selects descendants and nav>ul direct children.WEB11
Choice by choice
A · incorrect — #highlight selects an ID rather than elements with the highlight class.
B · correct — .highlight is the dot-prefixed class selector matching the requested class.
C · incorrect — *highlight is not the defined class-selector syntax.
D · incorrect — Bare highlight is an element-type selector rather than a class selector.
Question 270
Which method of inserting CSS allows it to apply to multiple pages?
A. Inline
B. Internal
C. External
D. Embedded
Hint / Module Reference (Where to Read)
Identify which elements a rule targets and distinguish selector syntax from declaration syntax.
WEB11 says external CSS promotes reuse and consistent design through a linked stylesheet. Multiple documents can link the same styles.css file, so one shared source applies across pages. Inline declarations belong to one element and internal/embedded style blocks belong to their document. They can be copied, but copying is not the shared-source attachment method requested.
Evidence in the complete study note
An external sheet uses <link rel="stylesheet" href="styles.css"> in head; an internal sheet uses style; an inline declaration uses an element’s style attribute.WEB11
External CSS promotes reuse, consistent design and caching; it does not guarantee that every page becomes smaller or accessible.WEB11
Choice by choice
A · incorrect — Inline declarations belong to an element rather than one shared stylesheet linked by multiple pages.
B · incorrect — An internal style block belongs to its document rather than a separately shared resource.
C · correct — Multiple pages can link the same external stylesheet for shared rules and maintenance.
D · incorrect — Embedded styles are document-local rather than the shared external attachment method.
Question 271
What symbol is used to group multiple selectors in CSS?
A. Semicolon (;)
B. Colon (:)
C. Comma (,)
D. Dot (.)
Hint / Module Reference (Where to Read)
Identify which elements a rule targets and distinguish selector syntax from declaration syntax.
WEB11 groups selectors using h1,h2. The comma separates alternative selectors that receive the same declaration block. Semicolons separate declarations, colons separate a property from its value or occur in pseudo syntax, and dots introduce classes. Thus C is the selector-list grouping separator, not a declaration delimiter.
Evidence in the complete study note
Type p selects paragraph elements, .notice selects a class, #logo an ID, h1,h2 groups selectors, nav ul selects descendants and nav>ul direct children.WEB11
A rule is selector { property: value; }.WEB11
Choice by choice
A · incorrect — Semicolons separate declarations rather than selectors in a selector list.
B · incorrect — A colon is not the separator for grouped alternative selectors.
C · correct — A comma groups selector alternatives, as in the note’s h1,h2 example.
D · incorrect — A dot introduces a class selector rather than grouping multiple selectors.
Question 272
What does text-decoration: underline do in CSS?
A. Makes text bold
B. Makes text italic
C. Underlines text
D. Strikes through text
Hint / Module Reference (Where to Read)
Identify the requested presentation effect and layout context before matching the property or rule.
WEB13 assigns text-decoration effects such as underline. The specific value underline therefore adds an underline decoration. Bold uses font-weight and italic uses font-style; a strike-through is a different decoration value. The declaration changes presentation rather than the semantic importance or stress of the underlying HTML text.
Evidence in the complete study note
color sets text color; background-color sets background; font-size size, font-family face, font-style italic, font-weight weight, text-align inline-content alignment, and text-decoration effects such as underline.WEB13
Choice by choice
A · incorrect — Boldness is controlled by font-weight rather than the underline decoration.
B · incorrect — Italic styling uses font-style rather than text-decoration:underline.
C · correct — The underline value requests an underline text decoration.
D · incorrect — A strike-through is a different decoration, not the underline value shown.
Question 273
Which HTML tag makes text bold with semantic importance?
A. <b>
B. <bold>
C. <strong>
D. <em>
Hint / Module Reference (Where to Read)
Use the element or attribute meaning and document structure, rather than appearance or a similar-looking name.
WEB06 says strong expresses importance while em expresses stress, and warns that b/i are not identical to those meanings. Thus the semantic-importance requirement selects strong rather than merely a bold-looking b. Default styling is commonly bold but CSS can change appearance; the semantic distinction remains the reason for the answer.
Evidence in the complete study note
<strong> indicates importance and <em> stress; <b>/<i> have other text semantics and are not identical to importance/emphasis.WEB06
Choice by choice
A · incorrect — b has different text semantics and is not the element for importance specified in WEB06.
B · incorrect — bold is not the semantic importance element defined in the note.
C · correct — strong explicitly indicates importance and is the requested semantic choice.
D · incorrect — em marks stress emphasis rather than the stated importance role.
Question 274
Which HTML element is used for superscript text like E=mc²?
A. <sub>
B. <sup>
C. <small>
D. <em>
Hint / Module Reference (Where to Read)
Use the element or attribute meaning and document structure, rather than appearance or a similar-looking name.
WEB06 pairs sub and sup with subscript and superscript. The raised exponent in E=mc² is a superscript, so sup is the matching element. sub would lower text, and small or em have other meanings rather than expressing the exponent’s raised placement. The answer identifies the markup role rather than a CSS font-size choice.
Evidence in the complete study note
<sub>/<sup> mark sub/superscripts.WEB06
Choice by choice
A · incorrect — sub marks subscript, the opposite vertical placement from the raised exponent.
B · correct — sup marks superscript such as the raised two in E=mc².
C · incorrect — small does not identify the superscript placement required by the example.
D · incorrect — em marks stress emphasis rather than superscript position.
Question 275
What is the purpose of HTML comments?
A. They are displayed on the webpage
B. They style the content
C. They are ignored by the browser and add notes
D. They link to external files
Hint / Module Reference (Where to Read)
Use the element or attribute meaning and document structure, rather than appearance or a similar-looking name.
Correct answer: C — Comments add source notes without appearing as ordinary page content.
WEB06 states that <!-- comment --> is not displayed but remains visible in source. Thus C’s ignored wording should mean ignored for ordinary visual rendering, not removed from the DOM or hidden from source inspection. Comments do not themselves style content or link an external file, so the other purposes do not match.
Evidence in the complete study note
<!-- comment --> is not displayed but remains visible in source.WEB06
Choice by choice
A · incorrect — HTML comments are not displayed as ordinary document content.
B · incorrect — Comments do not supply CSS declarations or style the content by themselves.
C · correct — Comments hold source notes and are not normally rendered; they remain visible in source.
D · incorrect — A comment is not the markup mechanism for linking external resources.
Question 276
Which JavaScript keyword declares a block-scoped variable?
A. var
B. let
C. def
D. dim
Hint / Module Reference (Where to Read)
Check exact language syntax, declaration rules and execution context before reasoning about the result.
WEB15 explicitly distinguishes function/global var from block-scoped let and const. Of the offered names, let declares a block-scoped variable. const would additionally prevent rebinding but is not offered here. def and dim are not JavaScript declaration keywords in the supplied syntax. Therefore B matches the requested scope behavior.
Evidence in the complete study note
var has function/global scope; let/const are block-scoped.WEB15
Choice by choice
A · incorrect — var has function/global scope rather than the block scope requested.
B · correct — let declares a block-scoped JavaScript variable.
C · incorrect — def is not the JavaScript variable-declaration keyword defined in the note.
D · incorrect — dim is not the JavaScript variable-declaration keyword defined in the note.
Question 277
Which JavaScript keyword declares a constant that cannot be reassigned?
A. static
B. final
C. var
D. const
Hint / Module Reference (Where to Read)
Check exact language syntax, declaration rules and execution context before reasoning about the result.
WEB15 says const prevents rebinding but does not prevent mutation of an object’s contents. That is the precise constant-binding property in the stem. var permits reassignment, while static and final are not the declaration form described here. D therefore answers the binding question without claiming that every object assigned to const becomes deeply immutable.
Evidence in the complete study note
var has function/global scope; let/const are block-scoped.WEB15
const prevents rebinding but not mutation of an object’s contents.WEB15
Choice by choice
A · incorrect — static is not the const variable-declaration form for preventing rebinding.
B · incorrect — final is not the JavaScript binding declaration defined in WEB15.
C · incorrect — var permits reassignment and does not provide a constant binding.
D · correct — const prevents rebinding, though object contents can still be mutated.
Question 278
How are single-line comments written in JavaScript?
A. <!-- comment -->
B. /* comment */
C. // comment
D. # comment
Hint / Module Reference (Where to Read)
Use the element or attribute meaning and document structure, rather than appearance or a similar-looking name.
WEB15 defines // comments as ending at the line end and /* */ as block comments. Therefore C is the single-line comment syntax. A block comment may be physically written on one line, but it remains a different delimiter form and can span lines. HTML and hash-style markers are not the single-line syntax requested in the note.
Evidence in the complete study note
// comments end at line end; /* */ span a block.WEB15
<!-- comment --> is not displayed but remains visible in source.WEB06
Choice by choice
A · incorrect — The shown marker is an HTML comment form rather than the standard JavaScript single-line form.
B · incorrect — This is block-comment syntax, even when physically written on one line.
C · correct — Double slash starts a JavaScript comment that ends at the line end.
D · incorrect — A hash is not the ordinary JavaScript single-line comment delimiter given in WEB15.
Question 279
A form uses onsubmit="return validate()". If validate() returns false, what happens to the cancelable default submission?
A. Submits the form
B. Refreshes the page
C. Prevents form submission
D. Clears all form fields
Hint / Module Reference (Where to Read)
Separate event dispatch, handler registration and cancellation of the browser default action.
The inline onsubmit convention consumes the value returned by validate. Returning false therefore cancels the form’s default submission in this stated setup. It does not clear fields or explicitly refresh the page. The caller matters: returning false from a callback installed through addEventListener would not by itself cancel submission and would require preventDefault instead. The revised question includes the handler convention needed for the definite result.
Evidence in the complete study note
Returning false from an addEventListener callback does not cancel it; return false works in an appropriate inline/onsubmit property handler whose caller uses that return.WEB21
Choice by choice
A · incorrect — The consumed false result cancels rather than initiates default submission.
B · incorrect — No page-refresh action is requested by returning false.
C · correct — The inline onsubmit return convention cancels the default submission.
D · incorrect — Returning a Boolean does not clear control values.
Question 280
Which event fires when a page finishes loading in JavaScript?
A. onclick
B. onsubmit
C. oninput
D. window.onload
Hint / Module Reference (Where to Read)
Separate event dispatch, handler registration and cancellation of the browser default action.
Correct answer: D — window.onload is the handler property for the page load event.
WEB22 says window.onload handles load, typically after dependent resources finish. D therefore names the relevant handler property, although the actual event name is load rather than window.onload. Click, submit, and input refer to other interactions. This distinction avoids confusing a property used to register a handler with the event object or event name itself.
Evidence in the complete study note
window.onload is a handler property for the load event, typically after dependent resources finish.WEB22
An event handler runs when an event occurs: click, input, keydown, mouseover, submit and load are examples.WEB21
Choice by choice
A · incorrect — onclick handles clicks, not completion of page resource loading.
B · incorrect — onsubmit handles form submission, not the page load completion event.
C · incorrect — oninput handles control input changes, not the page load completion event.
D · correct — window.onload registers the handler for load, normally after dependent resources finish.
Question 281
In PHP, how do you declare a variable named name with value 'John'?
A. var name = 'John';
B. let $name = 'John';
C. $name = 'John';
D. name = 'John';
Hint / Module Reference (Where to Read)
Check exact language syntax, declaration rules and execution context before reasoning about the result.
WEB23 requires a dollar-prefixed PHP variable name and permits dynamic typing without a preceding type declaration. C correctly assigns the single-quoted string to $name. var name and let mix other declaration syntax with PHP, while bare name lacks the required sigil. No separate JavaScript-style declaration keyword is needed for this ordinary PHP assignment.
Evidence in the complete study note
Variables begin with $, then a letter/underscore and subsequent letters/digits/underscores; $AGE18 works but $18AGE does not.WEB23
Dynamic typing permits values of different types without a preceding type declaration, though optional declarations can constrain them.WEB23
A complete ordinary PHP assignment statement ends with a semicolon.WEB-S06
Choice by choice
A · incorrect — This is not the ordinary PHP assignment syntax and lacks the dollar-prefixed variable name.
B · incorrect — let is not the PHP declaration syntax for this assignment.
C · correct — The dollar-prefixed variable and quoted string assignment are valid PHP syntax.
D · incorrect — Bare name lacks the required dollar sigil for a PHP variable.
Question 282
Which PHP function returns the length of a string?
A. str_word_count()
B. strrev()
C. strlen()
D. strpos()
Hint / Module Reference (Where to Read)
Identify the role requested and compare it with the definitions and constraints in the cited passages.
WEB24 says strlen counts bytes, so it is the matching length function. For ordinary ASCII strings byte count also equals character count; multibyte Unicode can differ. strrev reverses, strpos locates a substring, and a word-count operation does not measure the string’s byte length. The qualification prevents treating strlen as a universal user-perceived-character counter.
Evidence in the complete study note
strlen counts bytes; strpos can return integer0 or false, requiring ===false for failure.WEB24
strrev reverses bytes and str_replace replaces matching content.WEB24
Choice by choice
A · incorrect — Word counting does not measure the string’s byte length.
B · incorrect — strrev reverses the byte sequence rather than returning its length.
C · correct — strlen returns byte length, matching the requested function with the Unicode caveat.
D · incorrect — strpos returns a substring position or false rather than a length.
Question 283
What does strrev("Hello") return in PHP?
A. Hello
B. hello
C. HELLO
D. olleH
Hint / Module Reference (Where to Read)
Identify the role requested and compare it with the definitions and constraints in the cited passages.
WEB24 defines strrev as reversing bytes. Hello is ASCII, so reversing its five bytes gives o,l,l,e,H in that order, retaining the original uppercase H at the final position. The function does not perform lowercase or uppercase conversion and does not leave the sequence unchanged. D is the exact returned string.
Evidence in the complete study note
strrev reverses bytes and str_replace replaces matching content.WEB24
Choice by choice
A · incorrect — Hello is unchanged, whereas strrev reverses the byte order.
B · incorrect — Lowercasing is not the operation performed by strrev.
C · incorrect — Uppercasing is not the operation performed by strrev.
D · correct — Reversing the ASCII bytes H,e,l,l,o yields o,l,l,e,H.
Question 284
Which PHP function finds the position of a substring within a string?
A. str_replace()
B. strpos()
C. strlen()
D. strrev()
Hint / Module Reference (Where to Read)
Identify the role requested and compare it with the definitions and constraints in the cited passages.
WEB24 identifies strpos as the substring-position function and warns that a successful position zero differs from false. Use strict ===false when checking failure so an initial-position match is not mistaken for absence. Replacement, length, and reversal functions perform different operations. Thus B names the lookup API rather than a transformation function.
Evidence in the complete study note
strlen counts bytes; strpos can return integer0 or false, requiring ===false for failure.WEB24
strrev reverses bytes and str_replace replaces matching content.WEB24
Choice by choice
A · incorrect — str_replace changes matching content rather than reporting the match position.
B · correct — strpos finds a substring position, returning zero legitimately or false for failure.
C · incorrect — strlen measures byte length rather than locating a substring.
D · incorrect — strrev reverses bytes instead of reporting a match location.
Question 285
What is the key difference between include and require in PHP?
A. include is faster than require
B. require gives a fatal error if file is missing; include gives a warning
C. include gives a fatal error; require gives a warning
D. There is no difference
Hint / Module Reference (Where to Read)
Identify the role requested and compare it with the definitions and constraints in the cited passages.
Correct answer: B — include warns; failed require raises Error in PHP8 and stops normal execution if uncaught.
WEB33 distinguishes include’s warning from require’s critical failure. B captures the conventional contrast when require’s failure is uncaught, but PHP8 raises a catchable Error rather than the older E_COMPILE_ERROR description. The distinction is failure behavior, not an inherent speed ranking. C reverses the behaviors and D denies the explicit difference.
Evidence in the complete study note
include evaluates another file in the current scope and warns on failure; require fails critically.WEB33
In PHP8 a failed require raises Error, which can be caught; uncaught it stops normal execution.WEB33
Choice by choice
A · incorrect — No inherent speed advantage is the failure-handling distinction defined by WEB33.
B · correct — This is the conventional contrast for an uncaught failure; PHP8 require raises a catchable Error.
C · incorrect — This reverses include’s warning and require’s critical failure behavior.
D · incorrect — The note explicitly distinguishes their behavior when the target file cannot be included.
Question 286
Which PHP superglobal is dedicated specifically to supported form data submitted through POST, rather than a configurable mixture of request sources?
A. $_GET
B. $_SESSION
C. $_POST
D. $_REQUEST
Hint / Module Reference (Where to Read)
Identify the data source or security responsibility precisely, and check whether a combined source or a different control could also qualify.
$_POST directly represents supported form POST values. $_REQUEST can include POST values under some configurations, but it combines sources and is not dedicated to the form POST channel. $_GET represents URL query values and $_SESSION contains application session state. The source-specific wording makes C unique while preserving the fact that a configurable combined array may also expose some of the same submitted values.
Evidence in the complete study note
$_GET contains query parameters; $_POST contains supported form POST data; $_FILES upload metadata; $_SERVER request/environment details; $_COOKIE cookie values; $_SESSION session data after startup.WEB27
$_REQUEST may combine GET/POST/cookie data according to configuration; it is not a database interface and has ambiguous precedence, so prefer the intended source.WEB27
Choice by choice
A · incorrect — $_GET supplies URL query values.
B · incorrect — $_SESSION supplies stored session state rather than the current form POST source.
C · correct — $_POST is dedicated to supported form POST data.
D · incorrect — $_REQUEST may combine POST with other configured sources.
Question 287
Which SQL statement retrieves data from a database?
A. INSERT INTO
B. UPDATE
C. DELETE
D. SELECT
Hint / Module Reference (Where to Read)
Identify the API and operation first, then distinguish connection setup, statement execution and result processing.
WEB32 directly assigns retrieval to SELECT, adding to INSERT, changing values to UPDATE, and removal to DELETE. Therefore D is the SQL statement role requested. This identifies the operation’s semantics; the actual query still needs appropriate columns, filters, authorization, and safe parameter handling when incorporating submitted values.
WEB32 gives UPDATE ... SET as the form that changes values. SET introduces the target-column assignments, while WHERE limits which rows are affected. VALUES and INTO occur in other statement roles and do not replace SET’s assignment function. C therefore identifies the keyword requested, distinct from selecting the affected rows.
Correct answer: D — It ordinarily targets all rows for deletion, subject to constraints, permissions, and execution success.
WEB32 says WHERE limits affected rows and omitting it from DELETE ordinarily targets every row. Thus D is the intended effect of a successful unrestricted DELETE. No first-row-only rule exists, and omission is not inherently a syntax error. Permissions, constraints, or other errors can still prevent the operation, so the outcome is not an unconditional execution guarantee.
Evidence in the complete study note
WHERE limits affected/matching records; omitting it from DELETE ordinarily targets every row, subject to constraints, permissions and errors.WEB32
Choice by choice
A · incorrect — Without a filter, the statement ordinarily targets rows rather than doing nothing.
B · incorrect — There is no implicit first-row-only restriction when WHERE is omitted.
C · incorrect — Omitting WHERE is not by itself the stated syntax error.
D · correct — A successful unrestricted DELETE ordinarily deletes all targeted table rows, subject to database controls.
Question 290
Which PHP function establishes a connection to MySQL?
A. mysql_open()
B. db_connect()
C. mysqli_connect()
D. connect_mysql()
Hint / Module Reference (Where to Read)
Identify the API and operation first, then distinguish connection setup, statement execution and result processing.
WEB31 explicitly gives mysqli_connect(host,user,password,database,port,socket) as the MySQLi connection function. The other offered names are not the API identified here. Argument defaults and actual credentials affect connection success, so knowing the function name does not remove the need for configuration and failure handling. C is the valid connection entry point.
Evidence in the complete study note
mysqli_connect(host,user,password,database,port,socket) opens a connection; selecting a database can be deferred, and defaults make several arguments technically optional.WEB31
Choice by choice
A · incorrect — mysql_open() is not the MySQLi connection function given in WEB31.
B · incorrect — db_connect() is not the standard MySQLi connection function identified here.
C · correct — mysqli_connect() is explicitly the MySQLi connection-opening function in the note.
D · incorrect — connect_mysql() is not the offered standard API name described by WEB31.
Question 291
Which PHP function returns the ID of the last inserted record?
A. mysqli_last_id()
B. mysqli_insert_id()
C. mysqli_get_id()
D. mysqli_row_id()
Hint / Module Reference (Where to Read)
Identify the API and operation first, then distinguish connection setup, statement execution and result processing.
Correct answer: B — mysqli_insert_id($conn), for a generated AUTO_INCREMENT value on that connection.
WEB32 identifies mysqli_insert_id($conn) as reporting the connection’s generated AUTO_INCREMENT value. It is not a universal lookup of an arbitrary last row or a promise of gapless IDs. B names the correct function; the others invent different names. A connection argument and appropriate successful insertion context are needed in actual procedural code.
Evidence in the complete study note
mysqli_num_rows counts a result’s rows; mysqli_affected_rows($conn) counts changed/inserted/deleted rows under its options; mysqli_insert_id($conn) reports a generated AUTO_INCREMENT value from the connection.WEB32
AUTO_INCREMENT generates numeric values but gaps and explicit values are possible; do not promise gapless consecutive business numbering.WEB32
Choice by choice
A · incorrect — mysqli_last_id() is not the generated-value function named in WEB32.
B · correct — mysqli_insert_id($conn) reports the connection’s generated AUTO_INCREMENT value.
C · incorrect — mysqli_get_id() is not the API identified for the generated insert value.
D · incorrect — mysqli_row_id() is not the API named for a generated insert identifier.
Question 292
Which ordinary PHP variable scope can be accessed inside a function using a global declaration or, alternatively, the $GLOBALS array?
A. Local
B. Static
C. Global
D. Session
Hint / Module Reference (Where to Read)
Identify the role requested and compare it with the definitions and constraints in the cited passages.
A variable declared outside functions has global scope. A function normally has separate local bindings, so it can explicitly import such a binding with global or access it through $GLOBALS. The keyword is therefore one mechanism, not a mandatory exclusive spelling. A static local remains a function-local binding whose value persists across calls; session state belongs to a superglobal available across scopes.
Evidence in the complete study note
A variable outside a function has global scope.WEB25
A function’s locals and by-value parameters are separate bindings; use global $x or $GLOBALS["x"] to refer to a global explicitly.WEB25
A static local retains its value across calls during the execution lifecycle; static storage is not simply another visibility scope.WEB25
Superglobals are available across scopes.WEB25
Choice by choice
A · incorrect — Ordinary local bindings already belong to that function; this is not importing an outside binding.
B · incorrect — A static local retains its value across calls but remains local to the function.
C · correct — Global bindings are the outside-function bindings accessed by these two mechanisms.
D · incorrect — Session state uses a superglobal available across scopes, rather than this ordinary binding import.
Question 293
What is a PHP static variable?
A. A variable that cannot be changed
B. A global variable accessible everywhere
C. A local variable that retains its value between function calls
D. A variable stored in a session
Hint / Module Reference (Where to Read)
Check exact language syntax, declaration rules and execution context before reasoning about the result.
Correct answer: C — A local variable that retains its value between calls during the execution lifecycle.
WEB25 defines a static local by persistence across function calls. It remains a local binding and can change value; static is not the same as constant, global visibility, or server session storage. Thus C supplies both the local-scope and retained-state aspects, without treating static duration as an independent universal visibility scope.
Evidence in the complete study note
A static local retains its value across calls during the execution lifecycle; static storage is not simply another visibility scope.WEB25
Constants cannot normally be redefined during execution.WEB23
Choice by choice
A · incorrect — Static locals can change value; static does not mean immutable.
B · incorrect — Static persistence does not make the variable a global visible everywhere.
C · correct — A static local retains its value across calls during the execution lifecycle.
D · incorrect — A static local is not the same as data stored in $_SESSION.
Question 294
What does var_dump() do in PHP?
A. Deletes a variable
B. Displays data type and value of a variable
C. Converts a variable to a string
D. Validates a variable
Hint / Module Reference (Where to Read)
Check exact language syntax, declaration rules and execution context before reasoning about the result.
Correct answer: B — Display the variable’s type and value.
WEB23 explicitly states that var_dump displays type and value. It is diagnostic output, not a deletion, validation, or conversion guarantee. Observing a value can assist debugging, but it does not prove that the input satisfies application constraints. B is therefore the direct API purpose, while the alternatives describe unrelated operations.
Evidence in the complete study note
var_dump displays type and value.WEB23
Choice by choice
A · incorrect — var_dump does not delete the variable whose diagnostic information it displays.
B · correct — The note explicitly defines var_dump as displaying type and value.
C · incorrect — Diagnostic display is not a conversion of the original variable binding to a string.
D · incorrect — Displaying a value does not establish application-specific validation.
Question 295
Which PHP data type represents the absence of a value?
A. Boolean
B. String
C. Integer
D. NULL
Hint / Module Reference (Where to Read)
Check exact language syntax, declaration rules and execution context before reasoning about the result.
WEB23 says null means no value. Boolean represents true or false, String text, and integer numeric values; none is the same absence marker. In particular zero, false, and an empty string can be legitimate present values rather than null. D therefore matches the requested absence-of-value representation.
Evidence in the complete study note
Scalars include int,float,string,bool; arrays/objects are structured values and null means no value.WEB23
Choice by choice
A · incorrect — A Boolean is a true/false value rather than the absence marker.
B · incorrect — A string, including an empty one, is not the null absence marker.
C · incorrect — An integer such as zero is still a value rather than null.
D · correct — NULL is explicitly the no-value representation identified in WEB23.
Question 296
For ordinary HTML form submission, which statement correctly contrasts where POST places form data with GET’s URL query?
A. POST is faster than GET
B. POST data is visible in the URL
C. POST form data normally goes in the request body rather than the URL query, subject to configured size limits
D. POST is easier to implement
Hint / Module Reference (Where to Read)
Identify the protocol layer and the intended request, response or channel semantics.
Correct answer: C — POST form data normally goes in the request body rather than the URL query, subject to configured size limits
Ordinary GET forms place name/value pairs in the URL query, whereas POST forms place them in the request body. This is a placement distinction, not encryption: tools can inspect the body, and servers impose configured limits. The other claims either put POST fields in the wrong location or assert universal speed/ease advantages that do not follow from the method semantics.
Evidence in the complete study note
GET forms usually put name/value pairs in the URL query; POST forms put them in the body.WEB04
Neither method encrypts data.WEB04
POST bodies are visible to developer tools and subject to server/configured size limits.WEB04
Choice by choice
A · incorrect — Method choice does not guarantee that a POST operation is faster; this is not the placement contrast asked for.
B · incorrect — Ordinary POST form values are placed in the body, not the URL query used by GET forms.
C · correct — This gives the body-versus-query distinction while retaining configured limits and making no secrecy claim.
D · incorrect — Ease of implementation is application-dependent and does not describe the form-data placement difference.
Question 297
Which HTML form input type masks characters for security?
A. type="text"
B. type="hidden"
C. type="secure"
D. type="password"
Hint / Module Reference (Where to Read)
Separate the control role, displayed content, submitted value and form destination.
WEB09 says password inputs mask display but do not encrypt the transmitted value. D therefore supplies the intended visual masking. Hidden inputs remove visible interaction rather than offering a masked text-entry control, text displays characters normally, and secure is not the type defined here. Transport and server protection remain separate obligations.
Evidence in the complete study note
type="password" masks display but does not encrypt.WEB09
A hidden input carries a value without displaying an editable text field; it is not a password-masking control.WEB-S02
Choice by choice
A · incorrect — A text input displays entered characters normally rather than applying password masking.
B · incorrect — A hidden input is not an interactive masked-character text field.
C · incorrect — secure is not the password input type defined in the note.
D · correct — password masks displayed characters while leaving encryption to separate transport controls.
Question 298
What attribute groups radio buttons so only one can be selected?
A. id
B. value
C. name
D. group
Hint / Module Reference (Where to Read)
Separate the control role, displayed content, submitted value and form destination.
WEB09 explicitly groups same-name radio buttons for a single choice. id instead identifies an individual element and connects a label; value is the submitted selected value. group is not the grouping attribute defined here. Therefore C gives the shared attribute that creates the radio-choice group under the form-control model.
Evidence in the complete study note
A label’s for matches the control’s id; name identifies its submitted field.WEB09
Same-name radio buttons form a single-choice group; checkboxes permit independent selections.WEB09
For a text input, the value attribute supplies its initial text value; it does not specify the control’s width.WEB-S02
Choice by choice
A · incorrect — id identifies an individual control and associates labels rather than defining the shared radio group.
B · incorrect — value supplies the selected control’s submitted value rather than the grouping key.
C · correct — Radio buttons sharing the same name form a single-choice group.
D · incorrect — group is not the radio-grouping attribute defined in WEB09.
Question 299
Which HTML element creates a dropdown menu?
A. <input type="dropdown">
B. <dropdown>
C. <select>
D. <menu>
Hint / Module Reference (Where to Read)
Separate the control role, displayed content, submitted value and form destination.
Correct answer: C — <select> containing <option> elements.
WEB09 defines select with option children as the choice control, conventionally rendered as a dropdown in its ordinary single-selection form. The input type dropdown and dropdown element are not the provided control syntax. menu is not the form-selection element requested. Additional attributes can alter select presentation, but the native form-control answer remains C.
Correct answer: B — Hints which file types the browser’s file picker should offer
accept is a browser selection hint describing file types the picker should offer. It does not guarantee what an attacker can submit or what the server actually accepts. Server-side validation must separately check upload errors, size and content before safe storage. The attribute also neither initiates transfer, sets a maximum upload size nor validates a filename. The choice states the UI role without claiming server enforcement.
Evidence in the complete study note
accept hints to the browser which file types to offer; it does not enforce the server’s policy.WEB30
Validate server-side size/content, inspect upload errors, use the temporary upload path, choose a safe generated destination and use move_uploaded_file.WEB30
Choice by choice
A · incorrect — The attribute does not automatically start an upload.
B · correct — This is the browser-picker hint described in the note.
C · incorrect — Maximum upload size requires separate controls and validation.
D · incorrect — The attribute does not validate filenames.
Question 301
Which listed HTML elements can embed supported video or other multimedia resources in a suitable environment? Select all that apply.
A. <video>
B. <media>
C. <embed>
D. <object>
Hint / Module Reference (Where to Read)
Use the element or attribute meaning and document structure, rather than appearance or a similar-looking name.
Correct answers (select all): A, C, D — <video>; <embed>; <object>
video is the native HTML element for video, and embed and object can also embed supported resources, including multimedia in a suitable environment. The question allows these different embedding mechanisms rather than asking only for the native video element. media is not the corresponding HTML element. Browser support, resource formats and appropriate permissions still matter; the selection describes capability rather than guaranteed playback of every resource.
Evidence in the complete study note
Modern audio/video elements embed supported media, often with controls and fallback content; embed/object can also embed supported resources.WEB10
Choice by choice
A · correct — video is the native HTML video element.
B · incorrect — media is not the HTML multimedia-embedding element identified here.
C · correct — embed can embed supported multimedia resources.
D · correct — object can embed supported multimedia resources.
Question 302
What does session_start() do in PHP?
A. Creates a new database connection
B. Starts or resumes a session to store user data
C. Starts an HTML form
D. Initializes a new variable
Hint / Module Reference (Where to Read)
Follow the identifier and server-side state through the stated lifecycle or access check; distinguish client-controlled claims from server decisions.
Correct answer: B — Start or resume PHP session handling and make $_SESSION available.
WEB29 directly defines session_start() as starting or resuming session handling. The browser normally holds an opaque identifier while server-controlled storage holds the session data. This is separate from a database connection or an HTML form. It does not simply initialize one arbitrary variable, and the server still must validate authorization for protected actions.
Evidence in the complete study note
session_start() starts/resumes PHP session handling and makes $_SESSION available.WEB29
Normally the browser holds an opaque session identifier while data resides in server-controlled storage.WEB29
Choice by choice
A · incorrect — Session startup is separate from opening a database connection.
B · correct — session_start starts or resumes PHP session handling and makes $_SESSION available.
C · incorrect — It is not an HTML form-starting operation.
D · incorrect — It initializes session handling rather than merely declaring one arbitrary variable.
Question 303
In CSS, which selector type is denoted by a dot (.)?
A. ID selector
B. Element selector
C. Group selector
D. Class selector
Hint / Module Reference (Where to Read)
Identify which elements a rule targets and distinguish selector syntax from declaration syntax.
WEB11 defines .notice as a class selector and #logo as an ID selector. The dot is therefore the prefix for a class name, while an element selector uses its type name and grouping uses commas. D correctly identifies the selector category rather than a declaration property or an element’s unique ID.
Evidence in the complete study note
Type p selects paragraph elements, .notice selects a class, #logo an ID, h1,h2 groups selectors, nav ul selects descendants and nav>ul direct children.WEB11
Choice by choice
A · incorrect — An ID selector uses # rather than a dot.
B · incorrect — An element/type selector uses the element name without the class prefix.
C · incorrect — Grouping uses commas between selectors, not a dot.
D · correct — A dot prefixes a class selector, as in .notice.
Question 304
What does the SQL AUTO_INCREMENT property do?
A. Auto-updates a column when a record is modified
B. Generates a unique sequential number for a column
C. Automatically deletes old records
D. Automatically backs up the database
Hint / Module Reference (Where to Read)
Identify the API and operation first, then distinguish connection setup, statement execution and result processing.
Correct answer: B — Generate automatic numeric values, commonly used for keyed row identifiers; gaps are possible.
WEB32 says AUTO_INCREMENT generates numeric values and permits gaps or explicit values. B is the intended generated-number description when used with the normal keyed column design, but sequential must not mean gapless business numbering or a promise about every manually supplied value. It does not update arbitrary columns, delete records, or back up the database.
Evidence in the complete study note
AUTO_INCREMENT generates numeric values but gaps and explicit values are possible; do not promise gapless consecutive business numbering.WEB32
Choice by choice
A · incorrect — AUTO_INCREMENT does not automatically update an arbitrary column whenever a record is modified.
B · correct — It generates numeric values commonly used for row identifiers; gaps and explicit values remain possible.
C · incorrect — It does not automatically delete old rows.
D · incorrect — It does not perform database backups.
Question 305
Which PHP function closes a MySQL database connection?
A. mysqli_end()
B. mysqli_disconnect()
C. mysqli_close()
D. db_close()
Hint / Module Reference (Where to Read)
Identify the API and operation first, then distinguish connection setup, statement execution and result processing.
WEB32 explicitly gives mysqli_close as closing a connection. C names that MySQLi API; the procedural form uses the connection argument in real code. Closing a connection is separate from ending a query or deleting stored data, and the other offered function names are not the standard one identified here.
Evidence in the complete study note
Escape rendered cell text; use prepared statements for submitted values; mysqli_close closes the connection.WEB32
Choice by choice
A · incorrect — mysqli_end() is not the connection-closing function named in WEB32.
B · incorrect — mysqli_disconnect() is not the API identified here for this operation.
C · correct — mysqli_close closes the MySQLi connection, using its connection argument in procedural code.
D · incorrect — db_close() is not the standard MySQLi function named in the supplied note.