CSCI 4300 Web Programming Exam: Multiple Choice Questions and Answers, Exams of Advanced Education

A comprehensive set of multiple choice questions and answers covering key concepts in web programming, particularly focusing on html, css, and javascript. It serves as a valuable resource for students preparing for exams or seeking to reinforce their understanding of fundamental web development principles. The questions cover a wide range of topics, including html structure, css styling, javascript functionality, and web design best practices.

Typology: Exams

2024/2025

Available from 02/12/2025

Prof-Morrison
Prof-Morrison 🇺🇸

1

(2)

11K documents

1 / 29

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CSCI 4300 Web Programming Exam With Accurate Solutions
allow us to modify our styles depending on parameters like width of the window or
device type.
view options
media queries
classes
selectors - ANSWER media queries
Which CSS layout method is best suited to achieve this layout? - ANSWER flex
Which css grid property establishes a 3 equal column layout?
columns: .33 .33 .33
row: 3 3 3
grid-template-columns: 1fr 1fr 1fr
child: 1em 1em 1em - ANSWER grid-template-columns: 1fr 1fr 1fr
Website colors can be specified in
______
format as a 6 digit
______
number - ANSWER RGB
hex
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d

Partial preview of the text

Download CSCI 4300 Web Programming Exam: Multiple Choice Questions and Answers and more Exams Advanced Education in PDF only on Docsity!

CSCI 4300 Web Programming Exam With Accurate Solutions

allow us to modify our styles depending on parameters like width of the window or device type.

view options media queries classes selectors - ANSWER media queries

Which CSS layout method is best suited to achieve this layout? - ANSWER flex

Which css grid property establishes a 3 equal column layout?

columns: .33 .33. row: 3 3 3 grid-template-columns: 1fr 1fr 1fr child: 1em 1em 1em - ANSWER grid-template-columns: 1fr 1fr 1fr

Website colors can be specified in


format as a 6 digit


number - ANSWER RGB hex

The following css: .special { color: green; margin: 0 0 0 12px; }

Makes all paragraphs green with 12px margin bottom Makes paragraphs green with an optional 12px margin. Makes class special elements green with 12px left margin. Makes id special elements green with 12 px margin bottom - ANSWER Makes class special elements green with 12px left margin.

Which of the following CSS selects all links that are nested inside a list item?

ul .a {...} a:hover ul.li {...} a:link list-item {...} li a {....} - ANSWER li a {....}

In CSS which selectors allow you to target multiple elements on the page?

ids classes RFDs properties - ANSWER classes

Which of the following are css selectors?

element class tag id - ANSWER id element class

html tags used to create sections of the page

  • ANSWER element Update

displays "Update" as a link to update.html displays "update.html" as an attribute of Update displays "update" as plain text displays "update.html" as plain text - ANSWER displays "Update" as a link to update.html

In HTML, a numbered list is coded with a ul element that contains li elements an ol element that contains li elements an li element that contains ul elements an li element that contains ol elements - ANSWER an ol element that contains li elements

When you use an external style sheet with an HTML document, you get all but one of the benefits that follow. Which one is it?

Your CSS coding is simpler You separate the CSS code from the HTML code You provide consistent styling for all of the pages that use the style sheet You can modify the styling for all of the related pages by changing one style sheet - ANSWER Your CSS coding is simpler

Which of the following is a valid selector for a class named menu? Question options: menu #menu .menu class.menu - ANSWER .menu

border-radius: 30px 10px 20px 10px; border-radius: 10px 100px; - ANSWER border-radius: 10px 100px;

What elements would the style rule that follows apply to? .red { color: red; } Question options: The only element with an id of red All elements with an id of red The only element with a class named red All elements with the class named red - ANSWER All elements with the class named red

Which form method attribute sends data along with the page URL. Question options: GET PUT POST SEND - ANSWER GET

What attribute can set an html link to open in a new window vs the same window. Question options: target attr src href - ANSWER target

a link address described as a relation to the present directory

Question options: absolute URL relative URL destination URL sync path - ANSWER relative URL

This attribute specifies the action to be performed after a form is submitted. Question options: action method task source - ANSWER action

_______ elements do not start on a new line. They only take up as much width as necessary. Question options: outline inline block semantic - ANSWER inline

What is HTML and what is its role in web development? Question options: A high-level programming language interpreted by a browser. The standard markup language used for creating web pages and web applications. Html is a client-side markup language processed by the web browser. An object-oriented language to be compiled with an html compiler. - ANSWER The standard markup language used for creating web pages and web applications.

- ANSWER

A web page is made up of multiple html ________. Question options: elements contracts phases sections - ANSWER elements

What attribute is used to specify the link address in an anchor tag? Question options: attr addr href src - ANSWER href

Which form method attribute transfers information in the request body: Question options: GET PUT POST SEND - ANSWER POST

___________ level elements always start on a new line with some space before and after the element, always takes up the full width available.

Question options: outline inline block semantic - ANSWER block

How do you create hyperlinks in HTML? Question options: anchor tag hyper tag link tag underline tag - ANSWER anchor tag

part of the html tag used to specify additional style or information about the html tag, Question options: sources attributes meta items - ANSWER attributes

When a browser makes a request for a static web page, the web server Question options: returns the HTML for the page and the browser renders it renders the HTML for the page and returns it to the browser generates the HTML for the page and returns it to the browser finds the HTML for the page and renders it - ANSWER returns the HTML for the page and the browser renders it

  • ANSWER ....../ul>

Inline elements: Question options: always starts on a new line does not start on a new line takes the full width of the container takes the full width of the page only takes up as much width to hold the element - ANSWER does not start on a new line only takes up as much width to hold the element

html specifies _______ levels of headings Question options: 4 5 6 as many as you specify - ANSWER 6

Because applications like Google and Bing rank the pages of a website, a web developer needs to be concerned with Question options: search engine optimization cross-browser compatibility user accessibility responsive web design - ANSWER search engine optimization

A JavaScript runtime that executes code outside of the browser. Question options: node.js code assist jsRun codelens - ANSWER node.js

Node.js uses a ____________ architecture. (Check all that apply.) Question options: nonblocking blocking synchronous asynchronous single-thread multle-threaded - ANSWER asynchronous single-thread nonblocking

Express is a popular node.js module that lets you parse incoming requests and match those requests to particular ________ or URLs. Question options: paths routes threads nodes - ANSWER routes

The endpoints of a server that determine the way an application responds to a client request.

Listens for requests in the UI (frontend) on port 5000. Listens for requests on the backend (server) on port 5000. Listens for user input to the app and invokes the event handler. - ANSWER Listens for requests on the backend (server) on port 5000.

What is Node.js? Question options: A JavaScript runtime that allows you to execute JS outside of a browser. A framework for Express.js which in turn is a JavaScript runtime. A programming language that allows you to directly interact with databases. A frontend development environment for rendering component interfaces. - ANSWER A JavaScript runtime that allows you to execute JS outside of a browser.

What is Express.js? Question options: A JavaScript runtime that allows you to execute JS code outside of a browser. A framework for React.js. A framework for Node.js A templating engine for frontend development. - ANSWER A framework for Node.js

How often do you run your server-side script with Node.js when you want to start a server and handle incoming requests? Question options: Once for every request. Once for every request and every response. Once to start the server, register middleware, and begin listening for requests. Once for every user. - ANSWER Once to start the server, register middleware, and begin listening for requests.

an open standard file format written in key/value pairs of human-readable text to store and transmit data on the web. Question options: key-store JSON JWT express - ANSWER JSON

What does this code accomplish?

router.get('/home', (req,res) => { res.send('Hello,this is home router'); });

Question options: Creates a client-side home route. Gets a message from the database and sends to server. Establishes an endpoint at /home to accept new data on the server. Establishes an endpoint at /home to respond with a message from the server. - ANSWER Establishes an endpoint at /home to respond with a message from the server.

What does the following code accomplish?

router.post('/', (req,res) => { Item.create(req.body) .then((item) => res.json({ msg: 'item message'})) .catch((err) => res.status(400).json({error: 'Error'})); });

With Mongoose, each _______ is the blueprint of the document that we want to store. Question options: structs schema arrays tables - ANSWER schema

The Mongoose _______ method adds a new item in the database. Question options: store write create sync - ANSWER create

Mongoose is a(n) ______________ which maps the documents from a database into JavaScript objects. Question options: client framework responsive web framework object data mapper / object document mapper asynchronous javascript method - ANSWER object data mapper / object document mapper

constructors that take a schema and create an instance of a database document. Question options: model query key

mapper - ANSWER model

What is this testing? PUT Question options: updating an item in the database creating a new item in the database returning a list of items from the database reading a specific item from the database - ANSWER updating an item in the database

What is being tested in this image? GET /items/ Question options: Retrieval of a specific item from the database Retrieval of all items from the database Creation of a new item in the database Updating of an item in the database - ANSWER Retrieval of all items from the database

What does this code do? router.post('/', (req,res) => { Item.find() .then((item) => res.json(items)) .catch((err) => res.status(404).json({noitemsfound: 'No items found'})); }); Question options: Responds to all requests on the root route. Posts new items on the root route