3.4 Web Technologies (OCR A Level Computer Science) Flashcards

Exam code: H446

1/144

0Still learning

Know0

  • Define crawling in the context of search engines.

Cards in this collection (144)

  • Define crawling in the context of search engines.

    In search engines, crawling is the process where software programs called crawlers systematically visit webpages by following links and retrieve their HTML content.

  • Define indexing in relation to search engines.

    Indexing is the process of storing extracted information from webpages in a structured database, allowing for efficient and fast retrieval of relevant web pages in response to user queries.

  • What is the main purpose of the robots.txt file in relation to search engine crawling?

    The robots.txt file provides guidelines for crawlers on which areas of a website should be explored or avoided, helping website owners control search engine access to their content.

  • Crawlers discover new webpages by following       from one page to another.

    Crawlers discover new webpages by following links from one page to another.

  • True or False?

    Search engines must scan the entire web for every search query.

    False.

    Search engines use their indexed data to quickly find relevant results without scanning the whole web for each query.

  • Indexing allows search engines to provide users with         and         search results.

    Indexing allows search engines to provide users with relevant and up-to-date search results.

  • What factors do search engines consider when ranking web pages?

    Search engines use ranking algorithms that consider keyword relevance, backlinks, and user engagement to assess the quality and relevance of web pages.

  • Why do search engine crawlers periodically revisit indexed web pages?

    Crawlers periodically revisit indexed web pages to detect updates and changes, ensuring that search results display the latest available content.

  • Define PageRank algorithm.

    The PageRank algorithm is a ranking system that evaluates and ranks web pages based on their perceived relevance and importance.

  • What is the main purpose of the PageRank algorithm?

    The main purpose of the PageRank algorithm is to evaluate and rank web pages to provide better, more precise, and more relevant search results by analysing the importance of each page.

  • The PageRank algorithm considers both the       and       of inbound links to a web page.

    The PageRank algorithm considers both the quantity and quality of inbound links to a web page.

  • Which four key elements make up the PageRank algorithm?

    The four key elements of the PageRank algorithm are link analysis, link weight distribution, iterative calculation, and damping factor.

  • True or False?

    The PageRank algorithm only considers the number of keywords on a page to determine its ranking.

    False.

    The PageRank algorithm primarily considers the structure and quality of links between pages, not just the number of keywords.

  • Define damping factor.

    The damping factor is a value between 0 and 1 (usually 0.85) used in the PageRank algorithm to represent the probability that a user will jump to a random new page instead of following a link.

  • A       acts as a "vote" for the target page in the PageRank algorithm, with more       links giving greater importance.

    A link acts as a "vote" for the target page in the PageRank algorithm, with more high-quality links giving greater importance.

  • Name three additional factors, beyond link analysis, that may influence a page's ranking in modern search engines.

    Three additional factors influencing modern search rankings are user engagement, content freshness, and mobile-friendliness.

  • Define server side processing.

    Server side processing involves running code and carrying out operations on the server instead of on the client's device or browser.

  • What is the main purpose of using server side programming languages like PHP in web development?

    The main purpose is to handle incoming requests, process data, interact with databases, and generate dynamic content on the server.

  • Server side processing ensures         behaviour across different devices and browsers, as the processing logic is         on the server.

    Server side processing ensures consistent behaviour across different devices and browsers, as the processing logic is centralised on the server.

  • True or False?

    Server side processing can improve security by managing sensitive data and implementing access controls.

    True.

    Server side processing allows for the secure management of sensitive data and the implementation of access control measures.

  • Define client side processing.

    Client side processing is the act of carrying out code or processing tasks on the user's device, usually within the web browser, instead of on the server. This enables interactive and dynamic web experiences.

  • With JavaScript, developers can modify the      to make dynamic changes to a web page's content and structure.

    With JavaScript, developers can modify the Document Object Model (DOM) to make dynamic changes to a web page's content and structure.

  • What is an example of client side processing that allows users to receive instant feedback before submitting a form?

    An example is form validation using JavaScript, which checks user input in real time and provides instant feedback without needing to contact the server.

  • True or False?

    Client side processing can reduce server load and enable offline functionality, but it can also introduce security risks.

    True.

    Client side processing offloads tasks from the server and allows web applications to work offline, but since the code is visible to users, it can lead to security risks and exposure of sensitive information.

  • Define client side processing.

    Client side processing is when data is processed by the user's browser, allowing for immediate feedback and dynamic interfaces without needing to contact the server.

  • What type of tasks are best suited for server side processing?

    Server side processing is best for tasks that involve accessing databases, handling sensitive data, complex business logic, or server specific operations.

  • Checking user input with JavaScript before sending it to the server helps reduce         load and improves scalability.

    Checking user input with JavaScript before sending it to the server helps reduce server load and improves scalability.

  • True or False?

    Client side validation alone is enough to secure sensitive data on a website.

    False.

    Client side validation can be bypassed or disabled, so server side validation is necessary to ensure data security.

  • Define HTML.

    HTML, or Hypertext Markup Language, is the foundational language used to structure content on the web.

  • The       tag is used to create a hyperlink, and the       attribute specifies the URL the link points to.

    The <a> tag is used to create a hyperlink, and the href attribute specifies the URL the link points to.

  • Which HTML section contains information about the web page that is not displayed on the page itself?

    The head section contains information about the web page that is not displayed on the page itself. It is enclosed by <head> and </head> tags.

  • True or False?

    The <img> tag in HTML requires a closing tag and must always be placed inside the <body> section.

    False.

    The <img> tag is a self-closing tag and does not require a closing tag. While it is typically placed inside the <body> section, it is not a strict requirement of the tag itself.

  • Define class in HTML.

    A class in HTML is an attribute that can be used to assign the same identifier to multiple elements, allowing them to be styled collectively with CSS.

  • True or False?

    Only one HTML element can have a specific ID attribute.

    True.

    An ID must be unique within a page, so only one element can have a given ID.

  • A class or an ID can have              applied to it in the CSS.

    A class or an ID can have specific styling applied to it in the CSS.

  • How does the use of a class differ from an ID when styling HTML elements with CSS?

    A class can be used by many elements, whereas an ID can only be used by one unique element per page. Both can have specific styling applied in CSS.

  • Define HTML element.

    An HTML element is a building block of a webpage, defined by opening and closing tags such as <p> and </p>, which tells the browser how to display content.

  • What is the purpose of the <form> element in HTML?

    The <form> element is used to collect user input, allowing users to submit data such as text fields and buttons to a server for processing.

  • To create a hyperlink on an image in HTML, use the        tag with an      attribute, and place the      tag inside.

    To create a hyperlink on an image in HTML, use the <a> tag with an href attribute, and place the <img> tag inside.

  • True or False?

    The filename and link address in an HTML hyperlink must match exactly as given, including case and spelling.

    True.

    In HTML, the filenames and link addresses are case-sensitive and must match the given information exactly to work properly.

  • Define Cascading Style Sheets (CSS).

    Cascading Style Sheets (CSS) are used to define the style or appearance of a webpage, such as layout, colours, and fonts.

  • What is the difference between a class and an ID selector in CSS?

    A class selector is used to apply the same style to multiple HTML elements, while an ID selector is unique and applies styling to only one element per page.

  • In CSS, a class is denoted by a       followed by the class name, while an ID is represented by a      followed by the ID name.

    In CSS, a class is denoted by a full stop (.) followed by the class name, while an ID is represented by a hash (#) followed by the ID name.

  • True or False?

    Inline CSS overrides external stylesheets for the same element.

    True.

    When CSS is used within the HTML (inline or internal), it takes precedence and will override any external CSS styling for that element.

  • A       selector can be used to apply the same style to multiple elements, but an    selector can only be used once per page.

    A class selector can be used to apply the same style to multiple elements, but an ID selector can only be used once per page.

  • How can CSS be included in a webpage?

    CSS can be included within HTML using inline or internal styles, or linked externally in a separate file.

  • Define selector.

    A selector in CSS is a pattern used to select the HTML element(s) you want to style.

  • What is the main advantage of using class selectors in CSS?

    Class selectors allow you to apply the same style to multiple elements on a webpage, making your CSS more efficient and consistent.

  • Define class selector in CSS.

    A class selector in CSS is used to style all elements with a specific class by prefixing the class name with a dot (.).

  • True or False?

    In CSS, you use a # before the class name to select all elements of that class.

    False.

    You use a . (dot) before a class name, and a # (hash) before an identifier (ID).

  • To change the font colour in CSS, you use the         property, not colour.

    To change the font colour in CSS, you use the color property, not colour.

  • What CSS property changes the background colour of an element?

    The background-color property changes the background colour of an element.

  • Define identifier selector in CSS.

    An identifier selector in CSS is used to style an element with a specific ID by prefixing the ID with a # (hash).

  • In CSS, the code to set the text alignment of an element to the center is                        .

    In CSS, the code to set the text alignment of an element to the center is text-align: center;.

  • How can you style multiple properties for an element in external CSS?

    You can include multiple property-value pairs inside the curly braces for a selector. Each property should be separated by a semicolon.

  • The hex code        represents the colour red in CSS.

    The hex code #FF0000 represents the colour red in CSS.

  • Define JavaScript.

    JavaScript is a programming language that adds interactivity and dynamic functionality to webpages.

  • What is the primary purpose of JavaScript in web development?

    The primary purpose of JavaScript is to enhance webpages by enabling interactive features, dynamic content, form validation, and data manipulation directly in the user's web browser.

  • JavaScript allows a webpage to manipulate       elements and respond to user input.

    JavaScript allows a webpage to manipulate HTML elements and respond to user input.

  • Name two interactive features that can be implemented using JavaScript.

    Two interactive features that can be implemented using JavaScript include image sliders and drop-down menus.

  • A common use of JavaScript is to perform            on user-submitted forms, such as checking all required fields.

    A common use of JavaScript is to perform form validation on user-submitted forms, such as checking all required fields.

  • How does JavaScript enable dynamic content on webpages?

    JavaScript enables dynamic content by allowing content to update in response to user actions, such as loading more articles when a user scrolls to the end of a page.

  • Define data type in JavaScript.

    A data type in JavaScript is a classification of data according to the kind of data it represents, such as numbers, characters, or true/false values.

  • The         data type is used to represent whole numbers, while the      data type represents numbers with a fractional part.

    The Integer data type is used to represent whole numbers, while the Real data type represents numbers with a fractional part.

  • What is the difference between the Char and String data types in JavaScript?

    The Char data type represents a single character, while String represents a sequence of characters.

  • Define the Boolean data type.

    The Boolean data type is used to represent true or false values.

  • To declare a variable in JavaScript, use the     keyword followed by the variable name and value.

    To declare a variable in JavaScript, use the let keyword followed by the variable name and value.

  • True or False?

    Choosing the correct data type in a program helps ensure accuracy and efficiency.

    True.

    Choosing the correct data type helps the program run accurately and efficiently.

  • Define variable in JavaScript.

    A variable in JavaScript is a named storage location that can hold a single item of data, and its value can be changed during program execution.

  • What is a constant in JavaScript?

    A constant in JavaScript is a named storage location declared with the const keyword, which cannot be changed after it is set.

  • What is the difference between a variable and a constant in JavaScript?

    A variable can be changed during program execution, while a constant cannot be changed once it is set.

  • Variables are declared using a         , a name and a       .

    Variables are declared using a data type, a name and a value.

  • True or False?

    In JavaScript, variable names can start with a number.

    False.

    Variable names in JavaScript must start with a letter, $ or _, but cannot start with a number.

  • A constant in JavaScript is declared using the       keyword.

    A constant in JavaScript is declared using the const keyword.

  • Name two examples of data types in JavaScript.

    Examples of data types in JavaScript include integer and string.

  • The keyword      was used to declare variables before 2015, but this is now considered bad practice.

    The keyword var was used to declare variables before 2015, but this is now considered bad practice.

  • Define Document Object Model (DOM).

    The Document Object Model (DOM) is a programming interface that represents the structure of an HTML document, allowing JavaScript to access and modify the content, structure, and style of a webpage.

  • How can JavaScript change the contents of an HTML element?

    JavaScript can change the contents of an HTML element by using the getElementById() method to access the element and then modifying its innerHTML property.

  • To display a message to the user in a pop-up box, JavaScript uses the         function.

    To display a message to the user in a pop-up box, JavaScript uses the alert() function.

  • What does the innerHTML property do in JavaScript?

    The innerHTML property allows direct access to change the HTML content inside an element.

  • The method         is used to write text directly to the webpage in JavaScript.

    The method document.write() is used to write text directly to the webpage in JavaScript.

  • True or False?

    The alert() function replaces the content of an HTML element with a message.

    False.

    The alert() function displays a pop-up box with a message, but does not modify the content of an HTML element.

  • Define innerHTML.

    The innerHTML property is used in JavaScript to get or set the HTML content of an element.

  • To access an HTML element by its ID in JavaScript, use         .

    To access an HTML element by its ID in JavaScript, use document.getElementById().

  • Define selection (in JavaScript).

    Selection is a programming construct that allows certain lines of code to be executed only if a specified condition is true or false.

  • What are the three main programming constructs in JavaScript?

    The three main programming constructs in JavaScript are sequence, selection and iteration.

  • In JavaScript, an        statement is used to run code depending on whether a condition is true or false.

    In JavaScript, an if statement is used to run code depending on whether a condition is true or false.

  • True or False?

    The comparison operator == in JavaScript checks for equal value and equal type.

    False.

    The == operator checks for equal value only, not equal type. To check for both equal value and equal type, use ===.

  • Define if statement in JavaScript.

    An if statement in JavaScript is a conditional statement that runs a block of code only if a specified condition evaluates to true.

  • What is the purpose of an else clause in an if statement?

    The else clause provides an alternative block of code that is executed when the initial if condition evaluates to false.

  • In an if statement, the condition is enclosed in         and followed by a         of code to execute if it is true.

    In an if statement, the condition is enclosed in brackets and followed by a code block of code to execute if it is true.

  • True or False?

    You can use multiple else if clauses in a single if statement in JavaScript.

    True.

    You can use as many else if clauses as needed to check additional conditions after the initial if condition.

  • Define switch case statement in JavaScript.

    A switch case statement in JavaScript is a type of conditional statement that allows you to compare a single expression against multiple possible values and execute code based on the matched value.

  • What is the purpose of the default keyword in a JavaScript switch case statement?

    The default keyword specifies a block of code to execute if none of the case labels match the value of the expression in the switch statement.

  • In a switch case statement, if a       is not used after a case block, code execution will continue into the next case.

    In a switch case statement, if a break is not used after a case block, code execution will continue into the next case.

  • True or False?

    Switch case statements in JavaScript are useful when you need to compare a single expression to many possible values.

    True.

    Switch case statements are designed for situations where one expression needs to be compared against multiple values, making the code more readable and organized than using many if-else statements.

  • Define for loop in JavaScript.

    A for loop in JavaScript is a control flow statement that allows a block of code to repeatedly execute for a specified number of iterations.

  • What are the three main parts of the for loop syntax in JavaScript?

    The three main parts of the for loop syntax in JavaScript are initialisation, condition, and increment/decrement.

  • In a for loop, the         step is executed only once at the beginning to set up the counter variable.

    In a for loop, the initialisation step is executed only once at the beginning to set up the counter variable.

  • True or False?

    A for loop will continue to execute as long as its condition evaluates to true.

    True.

    A for loop checks its condition before each iteration and continues running the code block while the condition is true.

  • In JavaScript, i++, i = i + 1 and i += 1 all mean     the counter by 1.

    In JavaScript, i++, i = i + 1 and i += 1 all mean incrementing the counter by 1.

  • Define for...in loop in JavaScript.

    A for...in loop in JavaScript iterates over the indexes of properties in an object or the indexes of elements in an array.

  • What does the variable represent in a for...in loop when iterating over an array?

    In a for...in loop iterating over an array, the variable represents the current index of the array.

  • In a for...in loop, the statement fruits[index] is used to access the       associated with the current index.

    In a for...in loop, the statement fruits[index] is used to access the value associated with the current index.

  • Define while loop in JavaScript.

    A while loop in JavaScript is a control flow statement that repeatedly executes a block of code as long as a specified condition remains true.

  • What happens if the condition in a while loop is initially false?

    If the condition in a while loop is initially false, the code block inside the loop is not executed at all.

  • A while loop is useful when the number of         is unknown in advance.

    A while loop is useful when the number of iterations is unknown in advance.

  • True or False?

    The condition in a JavaScript while loop is evaluated after each iteration.

    False.

    The condition in a JavaScript while loop is evaluated before each iteration, not after.

  • Define do while loop in JavaScript.

    A do while loop in JavaScript is a control flow statement that executes a block of code at least once, and then continues executing the block as long as a specified condition remains true.

  • True or False?

    A do while loop in JavaScript may not execute the code block if the condition is false at the start.

    False.

    A do while loop always executes the code block at least once before checking the condition.

  • In a do while loop, the         is always executed before the         is evaluated.

    In a do while loop, the code block is always executed before the condition is evaluated.

  • What is the main difference between a do while loop and a while loop in JavaScript?

    The main difference is that a do while loop executes its code block at least once before checking the condition, whereas a while loop checks the condition before executing the code block.

  • Define string in JavaScript.

    A string in JavaScript is a sequence of characters enclosed in single quotes (') or double quotes (").

  • Strings are used in JavaScript for                     and manipulating text-based data.

    Strings are used in JavaScript for representing and manipulating text-based data.

  • How do you create a string in JavaScript?

    You create a string in JavaScript by enclosing a sequence of characters in either single quotes (') or double quotes (").

  • To find the length of a string in JavaScript, use the       property.

    To find the length of a string in JavaScript, use the length property.

  • What does the length property return for a string?

    The length property returns the number of characters in a string.

  • Define substring() method in JavaScript.

    The substring() method in JavaScript extracts a portion of a string and returns it as a new string, using the starting and optional ending indices.

  • The substring() method takes      parameters: the starting index and the           index (optional).

    The substring() method takes two parameters: the starting index and the ending index (optional).

  • True or False?

    In JavaScript, omitting the second parameter of substring() extracts characters from the starting index to the end of the string.

    True.

    If you omit the second parameter, substring() extracts from the starting index to the end of the string.

  • Define arithmetic operators in JavaScript.

    In JavaScript, arithmetic operators are symbols or keywords used to perform mathematical calculations such as addition, subtraction, multiplication, and division on numerical values.

  • The addition operator (+) can be used to        numerical values or           strings together.

    The addition operator (+) can be used to add numerical values or concatenate strings together.

  • What does the modulus operator (%) do in JavaScript?

    The modulus operator (%) returns the remainder when one number is divided by another in JavaScript.

  • True or False?

    In JavaScript, multiplication (*) is always performed before addition (+) unless parentheses are used.

    True.

    This follows the rules of operator precedence, so multiplication is done before addition unless parentheses change the order.

  • Define logical operator in JavaScript.

    A logical operator in JavaScript is a symbol or keyword used to compare values and return a boolean result.

  • True or False?

    The equal to operator (==) in JavaScript compares both value and type without type coercion.

    False.

    The equal to operator (==) performs type coercion and only compares values, not types.

  • The strict equal to operator (===) in JavaScript returns      only if the two values are equal in both        and      .

    The strict equal to operator (===) in JavaScript returns true only if the two values are equal in both value and type.

  • What does the greater than (>) operator do in JavaScript?

    The greater than (>) operator compares two values and returns true if the left operand is greater than the right operand.

  • Define nested statement in JavaScript.

    A nested statement in JavaScript is when one block of code is placed within another, such as an if statement or loop inside another if statement or loop.

  • What is the purpose of using nested if statements in JavaScript?

    Nested if statements allow you to evaluate multiple conditions and handle various scenarios, enabling more complex decision-making logic in your code.

  • True or False?

    Nested loops in JavaScript can be used to iterate over multiple sets of data.

    True.

    Nested loops allow you to iterate over multiple sets of data and create complex patterns of repetition in your code.

  • A nested if statement places an if statement        another if statement's code block.

    A nested if statement places an if statement inside another if statement's code block.

  • How do you calculate the total number of times the inner loop runs in nested loops?

    Multiply the number of times the outer loop runs by the number of times the inner loop runs to get the total number of inner loop executions.

  • In a nested for loop, the      loop contains another loop inside its code block.

    In a nested for loop, the outer loop contains another loop inside its code block.

  • Define nested loops in JavaScript.

    Nested loops refer to placing one loop inside the block of another loop in JavaScript, enabling iteration over multiple sets of data or more complex repetition patterns.

  • What is a practical use of nested loops in JavaScript when working with arrays?

    A common use for nested loops is to iterate over two-dimensional arrays such as matrices, allowing you to access every element within the array.

  • Define function in JavaScript.

    A function in JavaScript is a reusable block of code that performs a specific task or calculation and can return a value.

  • What is the main difference between a function and a procedure in JavaScript?

    The main difference is that a function returns a value, while a procedure does not return a value.

  • Functions and procedures promote         ,         , and              in code.

    Functions and procedures promote reusability, modularity, and organisation in code.

  • Why is it important to use descriptive names for functions and procedures in JavaScript?

    Descriptive names for functions and procedures indicate their purpose, which improves code readability and maintainability.

  • A procedure in JavaScript is a function that does           a value.

    A procedure in JavaScript is a function that does not return a value.

  • True or False?

    A function in JavaScript can be called from anywhere in the code once it is defined.

    True.

    Once a function is defined in JavaScript, it can be called from anywhere in the code where its scope allows.

  • Define parameter in the context of JavaScript functions.

    A parameter is a variable listed as a part of the function definition that receives a value when the function is called.

  • What is a best practice for the length of functions and procedures in JavaScript?

    Functions and procedures should be short and focused to improve readability and maintainability.

Sign up to unlock flashcards

or