W3 HTML Forms Questions and Answers PDF
Document Details
Uploaded by EncouragingZeugma7163
Camosun College
Tags
Summary
This document contains a collection of HTML-related exam-style questions. The questions cover various aspects of HTML, including forming elements, attributes, and how elements work on a webpage.
Full Transcript
## W3 - HTML Forms ### Question 18 (1 point) When a `<label>` tag is clicked on: - the element, that has a "name" attribute that matches the label's "id" attribute, is selected - the browser will submit the form - the element, that has an "id" attribute that matches the label's, "for" attribute i...
## W3 - HTML Forms ### Question 18 (1 point) When a `<label>` tag is clicked on: - the element, that has a "name" attribute that matches the label's "id" attribute, is selected - the browser will submit the form - the element, that has an "id" attribute that matches the label's, "for" attribute is selected - the element that is next to the label is selected ### Question 19 (1 point) The form's action attribute specifies: - the type of action required to submit the form using the submit button (click, double-click, no-click). - the location of an internally embedded form that can be used to submit a multi-step asynchronous data collection form. - the location of the script that processes the form submission data. - the placeholder default value for when the form is submitted with no data. ### Question 20 (1 point) The element to use for a multi-line text input is: - `<input type="textarea"></input>` - `<input type="text" multiple>` - `<textarea></textarea>` - `<text-area rows="3" cols="40"></text-area>` ## W2 - HTML ### Question 6 (1 point) According to HTML5 Standards, which choice describes how to use tables correctly on a web page? - Tables should be used to format content but not to structure a page. - Tables are only brown and made out of wood. - `<table>` should be used inside `<p></p>` - Tables should be used to structure a webpage. ### Question 7 (1 point) What does HTML stand for? - Hyper Text Material Language - Hyper Tabular Markup Language - Hyper Text Markup Language - High Text Markup Language ### Question 8 (1 point) Absolute URLs are used to point to web pages... - on the same web server - on other web servers - on either the same, or other web servers. ### Question 9 (1 point) Relative URLs point to web pages... - on other web servers. - on the same web server. - on both the same web server and other web servers. ### Question 10 (1 point) You can use image/video/code from other sources on your web page... - Any image is okay, but videos need a special `<author>` tag embedded. - Any image/video/code, even if they are copyrighted, so long as you cite your source. - Code is free to use, but images should be checked against the copyright statement. - Only if they are not copyrighted. Always cite your source page if the author requires it. ## W1 - Internet & Browsers ### Question 1 (1 point) What does TCP/IP stand for? - Transfer Continuity Protocol/Internet Protocol - Transmit Control Protocol/Information Protocol - Transmission Control Protocol/Information Protocol - Transmission Control Protocol/Internet Protocol ### Question 2 (1 point) Hypertext... - can be a word phrase or sentence - is a fast way of sending textual data across the internet - enables user to click a two-way "link" - refers to web resources restricted by user authentication ### Question 3 (1 point) DNS helps... - to translate human friendly domain names into IP addresses - to translate dynamic domain names into geo-locations - to translate IMAP connections into POP data - to translate distinct number systems for faster internet ### Question 4 (1 point) HTML... - is used by web browsers to display web pages using SMTP - is short for Hypertext Markup Language and defines the structure of a web page - is the web server structure used by HoTMail to serve messages - can be written using tags such as [table] and [body] ### Question 5 (1 point) HTTPS... - is the SIMPLE version of HTTP - is the SUPER faster version of HTTP - is the SECURE form of HTTP - is the packet SWITCHING form of HTTP ## Question 11 (1 point) Choose the correct statement. - A named anchor uses the % sign. For example: `<a href='my-page.html%my-anchor>My Link</a>` - A named anchor can be added to an absolute or relative link. - A named anchor is away of stopping the user from navigating away from the page, by "anchoring" them to a position in the web page. - A named anchor can only be used for links on the same page. ### Question 12 (1 point) The `<td>` tag represents a: - A table heading - A table body - A table cell - A table row ### Question 13 (1 point) Given the following HTML, what would be displayed in the web browser: ```html <!DOCTYPE html> <html> <head> <title>Hello World</title> </head> <body> <p>My name is George</p> </body> </html> ``` - Hello World - `<p>My name is George</p>` - Nothing - the page would be blank - My name is George ### Question 14 (1 point) HTML tags: - are enclosed by angle brackets. - spaces are permitted after the opening bracket for the start tag, but not after the closing bracket. - are not defined inside of another tag. - tag names must be lower case. ## Question 15 (1 point) Every web page should begin with the `<!DOCTYPE html>` definition. - True - False ## Question 16 (1 point) The `<head>` tag is what we use to display content to be displayed at the start of a section. - True - False ## Question 17 (1 point) The `<section>` tag cannot be contained within an `<article>` tag. - True - False ## Question 21 (1 point) Select the correct answer. In a form: - The GET method appends Form Data to the beginning of the URL - The POST method can not be seen in the URL - The GET method is the more secure way to send form data - The POST method encrypts form-data and appends it to the URL ## Question 22 (1 point) Which of the following is not a form `<input>` type: - date - file - div - color ## Question 23 (1 point) With CSS, how do you add a background color for all `<h1>` elements? - `h1{background-color:#FFFFFF;}` - `h1[bgcolor:#FFFFFF;}` - `h1.all (background-color:#FFFFFF;)` - `h1{background-colour:#FFFFFF;}` ## Question 24 (1 point) Choose the following CSS which is valid: - `body { font-size: 3em background-position: top left; table { color: green; font-size: 14px; #some-element ( ] bg-color: #ff0000; bg-size: cover; bg-image: url("some-image.jpg"); a-class-name, div. { text-decorations: underline: font-style: bold; 1` ## Question 25 (1 point) There are three ways to apply CSS to a webpage - inline, embedded, and as an external style sheet. - True - False ## Question 26 (1 point) `body (colour: black;)` is the correct CSS Syntax for changing text colour. - True - False ## Question 27 (1 point) What does CSS stand for? - Computer Style Sheets - Creative Style Sheets - Colourful Style Sheets - Cascading Style Sheets ## Question 28 (1 point) Which CSS code gives us: - `margin-right: 5px; margin-left: 10px; margin-top: 7px; margin-bottom: 2px;` - `margin: 7px 2px 10px 5px;` - `margin: 7px 5px 2px 10px;` - `margin: 10px 5px 7px 2px;` - `margin: 5px 10px 7px 2px;` ## Question 29 (1 point) Which of the following property sets the distance between an element's right border and the rightmost edge of its content? - auto - padding-right - margin-right - padding-left ## Question 30 (1 point) Identify the CSS property defining the corners shape of a border? - border-corner-radius - border-all-radius - border-radius - corner-border-radius ## Question 31 (1 point) ```css #STUFF ( position: relative; left: 20px; top: 20px ``` - Moves in relation to its original space - Moves in relation to its parent element - Moves in relation to the browser window - Moves in relation to its child element ## Question 32 (1 point) What does the following do: ```css @media only screen and (max-width: 600px) { body { background-color: lightblue; } @media only screen and (max-width: 400px) { body ( background-color: green; } ``` - Screens > than 600pixels will be light blue and > than 400px will be green - Screen sizes =< 600px will be light blue and =< 400px will be green - Screens >= thank 600px will be light blue and =<400px will be green - Screens < than 600px will be light blue and > than 400px will be green ## Question 33 (1 point) At what quality % should you target for optimal JPEG compression to obtain about a 90% reduction in file size. - None, JPEG images are auto optimized - None, JPEG images are lossless - 20%-40%, quality depending - 60%-80%, quality depending ## Question 34 (1 point) When should WebP images be used? (choose best answer) - When you want the smallest filesize possible, but don't need to worry about use outside of the web page. - When you don't want to worry about people stealing your images from your website. - When you want to be able to download the image and use it in another application. - When you need an image that is animated. ## Question 35 (1 point) When should you use PNG images? (choose the best answer) - When you need the smallest file size available. - For on-page graphics that require some transparency in a region. - When the browser doesn't support GIFs - When you need the image to scale infinitely with no loss in image quality. ## Question 36 (1 point) Non-anthropomorphic design is used because... - interfaces should not use blue for older visitors. - many humans do not want to talk to a computer. - error messages should be clear. - data should be sequenced and grouped effectively ## Question 37 (1 point) Error messages... - should be condemning. - should be general in their response. - provide enough info to set things right. - should not suggest that the user controls the interface. ## Question 38 (1 point) Internal locus of control.... - is when control is given to the internal hard drive. - is important so that the user feels in control of the system. - is when the ability of the user is not supported. - is when the user is surprised by a system action. ## Question 39 (1 point) Hick's Law states... - the fewer options you have to choose from, the longer it takes to pick one. - if given the choice, the user will choose the blue link over the red link. - the more options you have to choose from, the longer it takes to pick one. - the options you provide should be colored red and green. ## Question 40 (1 point) The 7 +/- 2 rule suggests... - we should provide between 5 and 9 items to choose from. - we should use between 5 and 9 colors in a webpage. - links in a page shouldn't be between 5pt and 9pt in size. - we should never use 7 links in a page, only 5 or 9. ## Question 41 (1 point) The animation property that specifies a style for the element when the animation is not playing is: - animation-fill-mode - animation-timing-function - animation-default-style - animation-default-state ## Question 42 (1 point) Animation duration can be both a unit of time (eg 1s), or a percentage of time (10%). - True - False ## Question 43 (1 point) The animation-timing-function which displays with the same speed from start to finish is - easy-does-it - ease - linear - cubic-bezier ## Question 44 (1 point) Before you can animate, you must define your animation. Choose the correct syntax for this below: - `@key-frames my-animation-name { } 0% {width: 100px; } 100% {width: 10px; }` - `@keyframe my-animation-name [ from {width: 100px; } to (width: 10px;)` - `@key-frames my-animation-name { 1 from {width: 100px; } to (width: 10px;} ` - `@keyframes my-animation-name { } from { width: 100px; } to (width: 10px; }` ## Question 45 (1 point) You can specify a finite or infinite number of time an animation will play/loop using the animation-iteration-count. - True - False ## Question 46 (1 point) What is the most popular Content Management System online? - Wix - Shopify - Wordpress - Joomla ## Question 47 (1 point) What is a Wordpress Plugin? - A tool to customize the appearance and color of your website. - Content listed in a reverse chronological order (newest content on top). - Something that adds new functionality to your Wordpress site or extends existing functionality on your site. - Blocks of content that you can add to your site's sidebars, footers, and other areas. ## Question 48 (1 point) What is a widget? - Blocks of content that you can add to your site's header, footer, sidebar and right below your blog post content. - Used for describing the presentation of a document written in a markup language. - Plugs ins for of your site that you can are meant for your site's body. - A tool to change the layout and design of your website. ## Question 49 (1 point) Fill in the blank: - Posts are _______ / Pages are ______ - show in the menu / used to great blog items. - not used for blogs / will not show in the menu. - organized using categories and tags / hierarchical, static and one-off" type content. - created with individual templates / organized in reverse chronological order. ## Question 50 (1 point) What is a Wordpress theme? - A plugin that extends functionality of a Wordpress site - Blocks of content that you can add to your site's sidebars, footers, and other areas - Combined design and messaging statements in your site that drive the user to a call of action. - A collection of files that work together to create websites with a unified design. ## Question 51 (1 point) When using Bootstrap, what is the difference between .container and .container-fluid? - .container has a max pixel width, while .container-fluid is 100% width - .container has a max width of 800px, while .container-fluid is 80% width - They do not vary unless you specify in your CSS code. - container has a max pixel height, while .container-fluid is 100% height ## Question 52 (1 point) In bootstrap, what selector do we primarily use to target premade CSS code? - Classes - ID's - Name Attribute - Bootstrap detects all of our elements automatically with Javascript ## Question 53 (1 point) What bootstrap class is used to style a form `<input type="text">` so that it has rounded corners. - text-control - remote-control - form-control - input-control ## Question 54 (1 point) Bootstrap grids: What is the correct math to make up a full column? - `<div class="col-sm-2">` - `<div class="col-sm-4">` - `<div class="col-sm-2">` - `<div class="col-sm-3">` - `<div class="col-sm-6">` - `<div class="col-sm-3">` - `<div class="col-sm-3">` - `<div class="col-sm-8">` - `<div class="col-sm-3">` - `<div class="col-sm-5">` - `<div class="col-sm-6">` - `<div class="col-sm-4">` ## Question 55 (1 point) The following HTML with bootstrap classes will result in what? ```html <div class='container-fluid'> <div class='row'> <div class='col col-md-6 col-lg-3'>Hello World</div> </div> </div> ``` - A column that is 60% wide for mobile phones, and 30% for tablets. - A column that is 100% for mobile, 50% wide for tablets, and 25% wide for desktops. - A column that is only fluid once the user resizes their browser to at least 768px wide. - A column that is 25% wide for large devices (lg), and 50% wide for mobile devices (md). ## Question 56 (5 points) Choose the best match. | | | | :---------------- | :------------------------------------------------------------------------------------------- | | Best for small database and many web-based applications. Does not work well under heavy loads or complex queries. Usually free to use. | 1. MySQL | | Enterprise level relational database management system. Is a direct competitor to Oracle. Different versions aimed from small to large applications. | 2. PostGRES | | Is a free version of MySQL. Good choice for medium-size databases. Works well with GIS data, so is common solution for mapping data. Usually free to use. | 3. Oracle | | Top tier relational database management system. Is considered for large enterprise environments for large databases under load. Super expensive. | 4. Microsoft SQL Server | | | 5. MariaDB | ## Question 57 (1 point) What are the two assertions that protect the integrity of a set of relations, in a relational model? - Unique Key - Master Key - Foreign Key - Primary Key ## Question 58 (1 point) SQL is short for: - Structured Query Linguistics - Structure Queries Language - Structured Query Language - Structured inQuery Linkage ## Question 59 (1 point) In a normalized relational database, repeated (redundant) attributes is not permitted. - True - False ## Question 60 (5 points) Match the terms to the corresponding description | | | | :-------------------- | :----------------- | | An association between entities | 1. Entity | | Example: A Student registers for a Class and a Class contains Student registrations | | | A person, place, thing, or event. | 2. Attribute | | Example: Student, Class, Book, Schedule | | | Field or Attribute | 3. Relationship | | | 4. Column | | Record or Tuple | 5. Row | | A property of a person, place, thing or event. | | | Example: for a "Student", this could include "name". "student number", or "address" | | ## Question 61 (1 point) In relational databases, the order of records and attributes is critically important: - True - False ## Question 62 (1 point) What is the command to view all available databases? ## Question 63 (1 point) What would be the command to switch to or use the database "F2023_COMP144_imd044" - `USE F2023_COMP144_imd044` - `SWITCH TO F2023_COMP144_imd044` - `CREATE DATABASE F2023_COMP144_imd044` ## Question 64 (1 point) What is the command to show all of the database tables in the currently selected database? - `SHOW TABLES` - `LIST TABLES` - `DISPLAY TABLES` ## Question 65 (1 point) What command (single word) is used to retrieve data from a database table? - `SELECT` - `GET` - `READ` - `FETCH` ## Question 66 (1 point) What is the command to log in to mysql with the username "imd044_f2023" - `mysql -u imd044_f2023` - `login imd044_f2023` ## Question 67 (1 point) Which type of join can potentially return very large data sets - SUPER JOIN - LARGE JOIN - FULL JOIN - SELF JOIN ## Question 68 (3 points) Choose the best match. | | | | :---------------------------------------------------------------------- | :----------------------- | | Returns all records when there is a match in either the left or right table records. | 1. (INNER) JOIN | | Returns all records from the first table, and all matched records from the second table. | 2. LEFT (OUTER) JOIN | | Selects all rows from both tables, provider that there is match between the columns. | 3. RIGHT (OUTER) JOIN | | Returns all records from the second table, and all matched records from the first table. | 4. FULL (OUTER) JOIN | | Is when a table is joined with itself. | 5. SELF JOIN | ## Question 69 (1 point) Aggregate functions (such as GROUP BY) can be filtered using the - HAVING clause - WHAT clause - WHERE clause - WITH clause