โ† All Web Development Flashcard Decks

Web Development Flashcards

25 cards from real Web Development practice questions. Tap to flip, then mark Knew It or Still Learning โ€” missed cards come back until you master them.

Read the first 20 Web Development flashcards as text
  1. In HTML 5, which of the following HTML 4 attributes has been removed?

    Answer: all of the above

    HTML5 aimed to separate content from presentation, encouraging developers to use CSS for styling. Consequently, many presentational attributes from HTML4 were removed or deprecated. The `link`, `text`, and `rules` attributes all fall into this category, as their functionalities are now handled more effectively and semantically by Cascading Style Sheets.

  2. In HTML 5, which of the following is not a new element?

    Answer: frameset

    HTML5 introduced several new semantic elements to improve document structure and accessibility, such as ``, ``, and ``. The `` element, however, was part of HTML4 and was used for creating framed web pages. This element has been removed in HTML5 due to its outdated nature and accessibility concerns, making it not a new element.

  3. In HTML 5, which of the following elements has been removed?

    Answer: dir

    HTML5 deprecated or removed several elements that were either redundant, purely presentational, or had better semantic alternatives. The `` element, originally intended for directory lists, was removed in favor of using the more versatile `` (unordered list) element. Therefore, `dir` is an element that has been removed in HTML5.

  4. Date/time content is shown using which of the following attributes?

    Answer: datetime

    The `` element in HTML5 is used to represent a specific point in time or a time range. To provide a machine-readable format of this time, the `datetime` attribute is utilized. This attribute allows browsers and search engines to understand the precise date and time, regardless of how the human-readable text is formatted.

  5. Which of the following elements is used to highlight content in the same way that a highlighter pen is used to highlight text in a book?

    Answer: mark

    The `` element in HTML5 is specifically designed to highlight text for reference or notation purposes, similar to using a highlighter pen. It semantically indicates content that is relevant in another context or for a particular reason. While `` and `` are for emphasis, `` is for drawing attention to specific parts of text.

  6. What else has to be done to make the Open Web Platform deliver on its promises?

    Answer: All of the above

    The Open Web Platform aims to be a robust and comprehensive environment for application development. To fully realize its potential and deliver on its promises, continuous advancements are necessary across multiple critical areas. These include enhancing media and real-time communication capabilities, strengthening security and privacy features, and improving overall performance and tuning.

  7. The wav file format is not supported by which of the following browsers?

    Answer: Internet Explorer

    While many modern browsers offer broad support for various audio formats, Internet Explorer (especially older versions) has historically had more limited native support for certain media types. WAV files, being uncompressed, are often less universally supported for direct web playback across all browser versions compared to more common compressed formats like MP3 or Ogg Vorbis.

  8. Which of the following properties includes audio controls such as play, pause, and volume?

    Answer: controls

    In HTML5, when embedding audio or video using the `` or `` elements, the `controls` attribute is used to display the browser's default playback interface. This interface typically includes essential features like play/pause buttons, a volume slider, and a progress bar. Without this attribute, the media would play without any visible user controls.

  9. Which of the following procedures must empty the list of subpaths in order for the context to have zero subpaths once more?

    Answer: beginPath()

    In the HTML Canvas API, the `beginPath()` method is crucial for starting a new drawing path. Its primary function is to empty the list of subpaths, effectively resetting the current path. This ensures that any subsequent drawing commands begin a fresh, independent path, preventing unintended connections to previous drawing segments.

  10. Which of the following is not an input tag attribute type?

    Answer: day

    HTML5 introduced several new `type` attributes for the `` tag to provide specialized input fields for specific data types. These include `week`, `month`, and `time` for various date and time-related inputs. However, `day` is not a standard standalone `type` attribute for the `` tag; individual days are typically handled within `date` or `datetime-local` types.

  11. Which option allows a sanboxed iframe to run script from the same domain?

    Answer: allow-scripts

    The `sandbox` attribute for iframes creates a highly restricted environment for embedded content, enhancing security by default. To allow JavaScript to execute within such a sandboxed iframe, the `allow-scripts` keyword must be explicitly added to the `sandbox` attribute's value. This grants specific permission for script execution within that isolated context.

  12. When you refer to variables in other scopes, what does the interpreter do?

    Answer: Traverse the stack

    When a JavaScript interpreter encounters a variable reference that isn't in the current scope, it systematically searches for that variable in enclosing scopes. This process involves traversing up the scope chain, which is conceptually represented by the call stack. The interpreter continues this traversal until the variable is found or the global scope is reached.

  13. To hold value, why do you need to establish locally scoped variables?

    Answer: To cache the reference document location

    Establishing locally scoped variables to hold values, especially references to DOM elements or other objects, is a common optimization technique. By caching these references in a local variable, the JavaScript engine avoids repeatedly traversing the DOM or re-evaluating expressions to find the same resource. This improves performance by providing quicker access to the referenced document location or object.

  14. After you've called StartTimeLogging(), what's the next step?

    Answer: Run the code

    The `StartTimeLogging()` function is typically used to mark the beginning of a code execution block whose performance is to be measured. After initiating this logging, the logical next step is to execute the specific code segment that you intend to profile. Once the code has run, a corresponding `StopTimeLogging()` function would then be called to record the elapsed time.

  15. How many different modes can the closure compiler be used in?

    Answer: 2

    The Google Closure Compiler primarily offers two distinct modes for optimizing JavaScript code. These are 'Simple optimizations,' which performs basic minification and whitespace removal, and 'Advanced optimizations,' which applies more aggressive transformations like renaming variables and functions, and dead code elimination. These two modes provide different levels of code size and performance improvements.

  16. What is the purpose of using simple mode?

    Answer: Removes the whitespaces

    The primary purpose of using the 'Simple optimizations' mode in the Google Closure Compiler is to reduce the file size of JavaScript code. This mode achieves its goal by removing unnecessary characters such as whitespace, comments, and line breaks. It makes the code more compact without altering its functionality, leading to faster download times.

  17. How efficient is the closure compiler?

    Answer: Reduces the size of the JavaScript files

    The Google Closure Compiler is highly efficient in optimizing JavaScript code for web delivery. Its main purpose is to parse, analyze, and rewrite JavaScript, resulting in significantly smaller file sizes. This reduction in file size directly leads to faster download times and improved overall performance of web applications.

  18. One of JavaScript's most important features is which of the following?

    Answer: Single-threaded

    One of JavaScript's most fundamental characteristics is its single-threaded nature, meaning it executes one command at a time in a single sequence. While it can manage asynchronous operations through mechanisms like the event loop and Web Workers, the main execution thread itself remains single-threaded. This design simplifies concurrency management but requires careful handling of long-running tasks.

  19. For a new worker, which of the following is a global object?

    Answer: WokersGlobalScope

    When a new Web Worker is created in JavaScript, it operates in its own isolated global scope, distinct from the main window's global object. This dedicated global object for worker environments is typically referred to as `WorkerGlobalScope` (or `DedicatedWorkerGlobalScope` for dedicated workers), which is represented by the option 'WokersGlobalScope'. It provides access to worker-specific APIs and properties.

  20. To disable only the fopen() and file() functions, which of the following statements should be used?

    Answer: disable_function- fopen(), file

    The `disable_functions` directive in PHP's `php.ini` file is used to prevent specific functions from being executed for security reasons. To disable multiple functions like `fopen()` and `file()`, their names are listed as a comma-separated string. The option `disable_function- fopen(), file` represents the attempt to specify these functions for disabling, despite a slight deviation from the standard `disable_functions = func1,func2` syntax.

How this page was made: written with AI tools. We have not yet matched this exam's facts to an official source, so confirm fees, dates and rules with the exam body. Not reviewed by a subject-matter expert. Editorial policy