Exam 1 Practice Questions
Basic concepts
- Which of the following is an example of an application?
- Microsoft Word
- Mac Finder
- Windows Explorer
- All of the above
- How are files organized on a computer?
- In folders
- In sub-folders
- In a hierarchical structure
- All of the above
- What happens when you double-click a file on a computer?
- The operating system determines which application to open the file with
- The file’s extension is read to determine the application
- The file is opened in the default application
- All of the above
- What is the current working directory?
- The directory actively being looked at when browsing files
- The directory where files are stored
- The directory where applications are installed
- All of the above
- What is the role of a client computer in a network?
- It requests data from a server computer
- It serves data to a server computer
- It acts as both a client and a server
- None of the above
- Which of the following is an example of a web server?
- Your personal computer
- A computer hosting a website
- A computer running a web browser
- All of the above
- What is the purpose of a web browser?
- To browse files on a computer
- To request and view web pages
- To serve data to other computers
- None of the above
- What is the difference between the internet and the web?
- The internet refers to the global network of interconnected computers, while the web refers to the interlinking hypertext documents on the internet
- The internet is accessible via the HTTP or HTTPS protocol, while the web includes other protocols as well
- The internet is used for email, file transfer, streaming media, and more, while the web is just one usage of the internet
- All of the above
- Which of the following is an example of a protocol used on the internet?
- HTTP
- IMAP
- FTP
- All of the above
- What is the purpose of uploading data?
- To transfer data from a client to a server
- To transfer data from a server to a client
- To request data from a server
- None of the above
- What is the purpose of downloading data?
- To transfer data from a client to a server
- To transfer data from a server to a client
- To request data from a server
- None of the above
- What is the term used to describe a computer that acts as both a client and a server?
- Peer-to-peer
- Hybrid
- Dual-role
- None of the above
- Which of the following is an example of a software client?
- Web browser
- File transfer protocol
- Voice over Internet Protocol
- All of the above
- What is the purpose of a web server?
- To host and serve data when requested by clients
- To browse files on a computer
- To transfer data from a client to a server
- None of the above
- How are files organized on a computer?
- In a linear structure
- In a circular structure
- In a hierarchical structure
- All of the above
- What is the purpose of the File menu in an application?
- To open files
- To save files
- To edit files
- All of the above
- What is the purpose of the Windows Explorer tool?
- To browse files on a Windows PC
- To browse files on a Mac OS X computer
- To serve data to clients
- None of the above
- What is the purpose of the Mac Finder tool?
- To browse files on a Windows PC
- To browse files on a Mac OS X computer
- To serve data to clients
- None of the above
- What is the purpose of the operating system’s mapping of file extensions to applications?
- To determine which application to open a file with
- To determine the file’s extension
- To organize files into folders
- All of the above
- How are files stored on a computer?
- In a linear structure
- In a circular structure
- In a hierarchical structure
- All of the above
- Which of the following are hardware? (select all that apply)
- Operating system
- Hard drive
- Applications
- Processor
- Display (e.g. a monitor, projector, etc)
- Mac OS X is really an extension of which operating system?
- Windows
- UNIX
- Linux
- MacOS9
- DOS
- Sailfish
- The first “modern” operating system that influenced all others was…
- Windows
- UNIX
- Linux
- MacOS9
- DOS
- Google’s Android operating system for mobile devices is based on Linux. However, Google does not pay royalties to the creators of Linux. Why is this possible?
- It is not legal… Google is breaking copyright law, but nobody has sued them… yet.
- Linux is released under the GNU General Public License that allows commercial reuse of the Linux code.
- Linus Torvalds and Richard Stallman decided to grant Google a perpetual license to Linux for free, since Google gives away so much for free to the public good.
- Sergey Brin, a founder of Google, is also the creator of the Linux kernel. Richard Stallman, the founder of GNU, has been hired by Google.
- Which technology innovator was the first major figure to take a public stand against the free sharing of software?
- Vannevar Bush
- Alan Kay
- Bill Gates
- Metallica
- Mark Zuckerberg
- The Linux operating system was the result of a project to develop a free clone of UNIX spearheaded by
- Linus Torvalds
- Richard Stallman
- Steve Jobs
- Bill Gates
- The “Desktop Metaphor” was invented in
- 1970 by Alan Kay at Xerox PARC
- Sir Tim Berners Lee at CERN in 1989
- Vannevar Bush of the US Office for Scientific Research in 1945
- Sergei Brin at Google in 2007
- Hypertext was first popularized by
- Vannevar Bush in 1945
- Richard Stallman in 1970
- Sir Tim Berners Lee in 1989
- Mark Zuckerberg in 2009
- The World Wide Web was invented by
- Vannevar Bush in 1945
- Bill Gates in 1971
- Sir Tim Berners Lee in 1989
- Mark Zuckerberg in 2009
- GNU stands for:
- Generally Not Useful
- Got New Unix
- GNU’s Not Unix
- Gimp Nodes Unite
- Using a native email app on an iOS or Android phone is an example of using…
- The Internet
- The World Wide Web
- The Internet and The World Wide Web
- SFTP
- A good filename for any file on any operating system… (select all that apply)
- contains all lowercase characters
- includes no special characters except the “_” underscore
- includes a file extension
- includes the word “file” somewhere in the filename
- A client computer… (select all that apply)
- makes requests to a server computer
- responds to requests from a server computer
- is a server computer
- must run the UNIX or Linux operating system
- What does an operating system do? (select all that apply)
- Interfaces with hardware
- Manages running processes
- Manages available memory
- Include the ability to organize data in a file system
- Copyleft (select all that apply)
- Is an official legal term in US law
- Is designed to respect the right of every software maker to earn a living
- Is encouraged by GNU
- Is exemplified by Linux
- All operating systems include the concept of file permissions
- That’s true
- That’s false
- All operating systems include a Graphical User Interface does an operating system do? (select all that apply)
- That’s true
- That’s false
- The binary number 101 is the same as the decimal number…
- 5
- 10
- 101
- 102
Operating systems
- What is the purpose of an operating system?
- To provide a user interface for interacting with the computer
- To manage hardware resources and provide services to applications
- To store and retrieve data from storage devices
- To connect to the internet and browse websites
- Which of the following is NOT a common type of operating system?
- Windows
- macOS
- Linux
- iOS
- How do users typically interact with an operating system?
- Through a graphical user interface (GUI)
- By writing code in a programming language
- By using voice commands
- By sending emails to the operating system
- What are some components typically included in an operating system?
- File system management
- Device drivers
- Network protocols
- All of the above
- What is the significance of GNU in the context of operating systems?
- GNU is an operating system kernel
- GNU is a popular programming language used in operating systems
- GNU is a collection of free software tools and utilities
- GNU is a type of operating system virus
- Which of the following statements is true about copyleft?
- Copyleft is a legal framework that restricts the use of software
- Copyleft allows anyone to modify and distribute software freely
- Copyleft is a term used to describe proprietary software licenses
- Copyleft is only applicable to open-source operating systems
- What is the purpose of the “Overview” section in the document?
- To provide a summary of the entire document
- To introduce the topic of operating systems
- To list the common types of operating systems
- To conclude the document
- What is the main focus of the “Interacting With The OS” section?
- Explaining how operating systems are developed
- Describing the different types of user interfaces
- Discussing the history of GNU and the free software movement
- Providing guidance on how users interact with operating systems
- Which section of the document discusses the components included in an operating system?
- Common Types of Operating Systems
- Interacting With The OS
- What’s In An OS
- GNU & Copyleft
- What is the purpose of the “Conclusions” section in the document?
- To summarize the main points discussed in the document
- To provide recommendations for further reading on the topic
- To present a personal opinion on the topic of operating systems
- To list additional resources for learning about operating systems
UNIX
- In UNIX-based systems, what is the command to view both hidden and non-hidden files?
chmod h+r
ls -a
ls --h
emacs
cd/
- In UNIX-based systems, which is the correct way to navigate from the current working directory into a subfolder named ‘media’?
cd /media
cd ~/media
cd ../media
cd media
cd public_html/media
- The following 5 questions refer to this directory listing
total 24
drwxr-xr-x 11 bartholemu staff 374 Jun 10 13:50 .
drwx------+ 17 bartholemu staff 578 Jun 14 14:56 ..
-rw-r--r--@ 1 bartholemu staff 6148 Jun 10 13:50 .DS_Store
drwxr-xr-x 6 bartholemu staff 204 Jun 1 13:16 examples_060134
drwxr-xr-x 5 bartholemu staff 170 Jun 2 13:10 examples_060234
drwxr-xr-x 5 bartholemu staff 170 Jun 3 12:02 examples_060334
drwxr-xr-x 5 bartholemu staff 170 Jun 4 11:56 examples_060434
drwxr-xr-x 6 bartholemu staff 204 Jun 8 12:48 examples_060834
drwxr-xr-x 7 bartholemu staff 238 Jun 9 12:32 examples_060934
drwxr-xr-x 6 bartholemu staff 204 Jun 10 12:40 examples_061034
-rw-r----- 1 bartholemu staff 700 Jun 9 17:05 student_websites_summer2034.txt
- How many directories appear in this listing?
- 0
- 2
- 7
- 9
- 10
- 11
- How many of those directories are subdirectories of the displayed directory?
- 0
- 2
- 7
- 9
- 10
- 11
- How many hidden files are displayed?
- 0
- 2
- 9
- 10
- What command was used to generate this listing?
chmod o+w
ls --la
ls -l
cd ../
- Assuming these files are on a web server within in a directory beneath the web root, would the file, student_websites_summer2034.txt be visible through a web browser?
- Yes
- No
- The command that would be used to alter the answer from the previous question would be:
chmod u-w student_websites_summer2034.txt
chmod o+r student_websites_summer2034.txt
chmod g+x student_websites_summer2034.txt
mv student_websites_summer2034 index.html
Remote login
- What is the hostname of the web server used for remote login?
i6.cims.nyu.edu
i6.nyu.edu
cims.nyu.edu
i6.webserver.com
- Which command is used to remotely log in to the web server?
ssh
ftp
telnet
http
- Where can you find your personal home folder on the web server?
/home/username
/public_html
/username/home
/web_root/username
- What is the purpose of the
public_html
folder?
- It is a shortcut to the account home directory.
- It contains files visible to the public through the web.
- It is the URL at which the public can view web pages.
- It is the folder where UNIX commands are executed.
- How can you access your web root directory from a web browser?
https://i6.cims.nyu.edu/~username
https://i6.nyu.edu/~username
https://cims.nyu.edu/~username
https://webserver.com/~username
- Which command is used to log in to the web server?
ssh username@i6.cims.nyu.edu
ssh i6.cims.nyu.edu
ssh username@webserver.com
ssh webserver.com
- How can you reset your password for the i6 account?
- Visit https://cims.nyu.edu/webapps/content/systems/resources/i6/resetpassword
- Contact the NYU CIMS Helpdesk.
- Use the UNIX command
resetpassword
. - Send an email to
i6@cims.nyu.edu
.
- What is the path to the web root directory?
~/public_html
/home/username
/home/username/public_html
/web_root/username/public_html
- Which type of command shell program is required for remote login?
- UNIX/Linux command shell
- Windows command prompt
- Mac Terminal
- PowerShell
- What should you do after logging in to your account home directory?
- Start trying some UNIX commands.
- Reset your password.
- Access the
public_html
folder. - Contact the NYU CIMS Helpdesk.
File transfer
- What is the purpose of using a file transfer program?
- To initiate file transfers between a client and a web server
- To provide a graphical user interface for non-technical users
- To speak the FTP and SFTP protocols to the server
- All of the above
- Which of the following is a recommended file transfer program?
- Cyberduck
- WinSCP
- Filezilla
- All of the above
- How do you connect to a web server using SFTP?
- Open a new SFTP connection in the file transfer program
- Enter the hostname and credentials to log in
- Use regular unencrypted FTP
- Where should you place your files on the web server to make them visible through the web URL?
- Home directory
- Web root directory
- Local file system
- Server file browser
- How do you upload files to the web server using a file transfer program?
- Drag-and-drop files from the local file system to the file transfer program
- Use the browse feature in the file transfer program
- Use the web browser to upload files directly
- None of the above
- How can you verify that the files are published on the web?
- Point a web browser to the web URL
- Check the server logs for file upload confirmation
- Use the file transfer program to check the server directory
- All of the above
- What is the web URL for a file located at “/home/username/public_html/origami.html” on the server “i6.cims.nyu.edu”?
http://i6.cims.nyu.edu/username/origami.html
http://i6.cims.nyu.edu/~username/origami.html
http://username.i6.cims.nyu.edu/origami.html
http://origami.html/i6.cims.nyu.edu/~username
- What should you do if you encounter a permissions error on the server?
- Check if the files are placed in the correct directory
- Grant read permissions to the files
- Grant execute permissions to scripts
- All of the above
- Which files must allow others to read them when published to the web?
- Only HTML files
- Only image files
- All files
- None of the files
- Which programs/scripts must have execute permissions granted to others on the web server?
- Python scripts
- Javascript scripts
- PHP scripts
- All of the above
Web Architecture
- What does HTTP stand for?
- HyperText Transfer Protocol
- HyperText Markup Language
- Hypertext Preprocessor
- Hypertext Styling Protocol
- Which request type is used when a web client wants to retrieve a specific information resource?
GET
POST
PUT
DELETE
- What does the status code range 400 to 499 indicate in a web server response?
- Success
- Client error
- Server error
- Redirection
- Which front-end technology controls the visual style of the content on a web page?
- HTML
- CSS
- JavaScript
- Bootstrap
- What is the purpose of semantic markup in HTML?
- To control the visual style of the content
- To indicate the content’s meaning and purpose
- To handle interactive behaviors of the web page
- To simplify and streamline the process of creating front-end interfaces
- Which CSS code would give all level 2 headings green text?
h2 { color: green; }
p { background-color: pink; }
img { width: 200px; height: 300px; }
article { border: 10px dotted pink; padding: 20px; }
- How can you select only the paragraphs with the class “my_favorite_paragraphs” in CSS?
p.my_favorite_paragraphs { box-shadow: 5px 5px 10px; }
p#a_really_special_paragraph { font-size: 24px; }
p { color: blue; }
p { font-weight: bold; }
- What is the purpose of the
action
attribute in an HTML form tag?
- To indicate the method of the form submission
- To specify the URL where the form data will be sent
- To define the type of form input elements
- To set the initial value of a form input element
- Which HTTP request type is used to send data to the web server along with the request?
GET
POST
PUT
DELETE
- What is the purpose of CSS Flexbox?
- To control the content present on the web page
- To handle the interactive behaviors of the web page
- To indicate the style and presentation of the web page
- To position elements and create layouts on the web page
- Which front-end framework provides ready-made CSS and JavaScript code for common interface design needs?
- Bootstrap
- Material UI
- React
- AngularJS
- What is the purpose of the
method
attribute in an HTML form tag?
- To indicate the action to be performed on the form data
- To specify the URL where the form data will be sent
- To define the type of form input elements
- To set the initial value of a form input element
- Which HTTP response status code indicates a successful request?
- 200 to 299
- 400 to 499
- 500 to 599
- 300 to 399
- What is the purpose of JavaScript in front-end web development?
- To control the content present on the web page
- To handle the interactive behaviors of the web page
- To indicate the style and presentation of the web page
- To position elements and create layouts on the web page
- Which front-end technology controls the content present on a web page?
- HTML
- CSS
- JavaScript
- Bootstrap
- What is the purpose of the
Content-Type
header in an HTTP request?
- To specify the type of data being sent in the request body
- To indicate the success or failure of the client’s request
- To define the type of form input elements
- To set the initial value of a form input element
- Which HTTP request type is used to retrieve a specific information resource?
GET
POST
PUT
DELETE
- What is the purpose of the
Accept-Encoding
header in an HTTP request?
- To specify the type of data being sent in the request body
- To indicate the success or failure of the client’s request
- To specify the preferred language for the response
- To specify the compression method for the response
- Which front-end technology controls the interactive behaviors of a web page?
- HTML
- CSS
- JavaScript
- Bootstrap
- What is the purpose of the
Accept-Language
header in an HTTP request?
- To specify the type of data being sent in the request body
- To indicate the success or failure of the client’s request
- To specify the preferred language for the response
- To specify the compression method for the response
HTML
- What is the purpose of the
title
element in HTML?
- It appears within the visible contents of the web page.
- It indicates the title of the document to the web browser.
- It is used to load a CSS file.
- Which element is used to inform the web browser of another file to load?
title
link
body
- What does the
body
tag indicate in HTML?
- The title of the document.
- An instruction to load a CSS document.
- The visible elements of the page.
- What is the purpose of tag pairs in HTML?
- They indicate the start and end of a conceptual element.
- They are self-closing tags.
- They contain arbitrary values.
- Which of the following is a self-closing tag in HTML?
title
link
body
- What is the purpose of tabs in HTML?
- They are interpreted as line breaks.
- They are ignored by the web browser.
- They indicate the start and end of a conceptual element.
- How should elements be formatted to improve code readability?
- Without line breaks or indentation.
- With line breaks and indentation.
- With multiple spaces and tabs.
- Which element is used to indicate the main heading of a page?
a
p
h1
- What is the purpose of attributes in HTML?
- They indicate the start and end of a conceptual element.
- They provide extra element settings.
- They contain arbitrary values.
- Which attribute is required for the
img
tag?
src
href
type
- Which element is used to group content within the
body
?
h1
div
link
- How can you test a web page that you have been developing?
- By running web server software on your own computer.
- By directly opening an HTML code file in your web browser.
- By using the Live Server extension in Visual Studio Code.
- What is the purpose of the
meta
element in thehead
?
- It indicates the title of the document.
- It provides metadata about the HTML document.
- It loads a CSS file.
- Which element is used to create a numbered list in HTML?
h1
a
ol
- What is the purpose of the
form
element in HTML?
- It indicates the main heading of a page.
- It is used to create a form for user input.
- It provides extra element settings.
- Which element is used to create a checkbox input in a form?
input
label
select
- What is the purpose of the
header
element in HTML?
- It is used to group content within the
body
. - It indicates the main heading of a page.
- It provides extra element settings.
- How can you run a web server on your own computer using Visual Studio Code?
- By directly opening an HTML code file in your web browser.
- By using the Live Server extension in Visual Studio Code.
- By installing the Live Server extension and clicking the
Go Live
button.
- Which element is used to create a video player in HTML?
h1
a
video
- Where can you find more information on using HTML elements?
- In the official HTML specification.
- In the w3schools.com HTML tutorials.
- In the Visual Studio Code documentation.
- The important distinction when choosing between
<ol>
and<ul>
elements when writing HTML code is…
<ol>
lists have default padding-left of 10px, while<ul>
lists do not- Items in
<ol>
lists have numbers whereas items in<ul>
lists have bullets <ol>
lists contain items with an important order, whereas<ul>
lists do not<ol>
lists can be customized to show Armenian characters instead of bullet points, whereas<ul>
lists cannot.- There is no distinction between
<ol>
and<ul>
elements in HTML
- The HTML element used to indicate a set of navigation links is…
<a>
<li>
<ul>
<nav>
- The required attribute of the
<a>
element is
- charset
- rel
- href
- lang
- The acronym, HTML, stands for
- Hyperdocument Transfer Markup Language
- Hidden Terminal Markdown Language
- Hypertext Markup Language
- Hypertext Transfer Markup Language
- Proper indentation of HTML and CSS code is important because… (select all that apply)
- The web browsers require it
- The specifications of the language require it
- Your instructor requires it
- It makes your code more readable by yourself and others
- None of the above - indentation of HTML and CSS is not required in this course
- Nesting of HTML tags indicates…
- the style of presentation
- the responsive breakpoints
- the organization and hierarchy of content
- the size of margin and padding on the elements
- The rule in HTML that “all tags that open must close!” is important because (select all that apply)
- HTML 5 requires that all elements have separate closing tags, so we close our tags to be HTML 5-compliant.
- Some older versions of HTML still in use, such as XHTML, require that all tags be closed, so we close all tags to make our code be compliant with HTML 5 as well as earlier versions of HTML.
- All of the above
- None of the above
- Which is the correct code for a link from a page hosted on the
i6.cims.nyu.edu
server to Wikipedia.org’s home page?
<a href="/wikipedia.org">
Click to go to Wikipedia</a>
<a href="www.wikipedia.org">
Click to go to Wikipedia</a>
<a href="wikipedia.org/index.html">
Click to go to Wikipedia</a>
<a href="http://wikipedia.org">
Click to go to Wikipedia</a>
<a href="sftp://wikipedia.org/index.html”>
Click to go to Wikipedia</a>
- So-called “wrapper” or “container” elements are useful in HTML code because they help… (select all that apply)
- center a page as a whole
- make block elements sit side-by-side
- control the width of a page as a whole
- prevent links from having an underline
- reduce the number of pages in a site
- Without the proper setting for the value of the
<meta>
tag’s charset attribute, …
- web pages will not be responsive
- non-latin characters may look garbled in the browser
- the
<body>
element’s default margins and padding will not be overridden - the title of the page will not appear in the browser’s tab
- The tag used to indicate the most important content on a given web page is…
<h1>
<aside>
<section>
<header>
- The tag used to indicate the version of HTML used by any given hypertext document is…
<html>
<!DOCTYPE>
<cite>
<div>
- HTML is intended to be used to indicate… (select all that apply)
- content
- presentation
- interactive behavior
- responsive design
- HTML code is rendered by the…
- Web browser
- Web server
- Web pages are published by…
- Downloading them from a web server
- Uploading them to a web server
- Emailing them to a special Google email account d. Copy-and-pasting them into a Facebook Chat
CSS
- Which language is used to style the content of a web page?
- HTML
- CSS
- JavaScript
- Python
- What is the philosophy behind the separation of concerns in web development?
- Different tasks should be accomplished by different technologies
- All tasks should be accomplished by a single technology
- HTML should control both content and presentation
- CSS should control both content and behavior
- Which is the preferred method of including CSS into an HTML document?
- External stylesheet file
- Internal style element
- Inline style attribute
- All methods are equally preferred
- How can you select all
p
elements in CSS?
- By tag name
- By
class
attribute - By
id
attribute - By attribute value
- Which property is used to change the text color in CSS?
color
background-color
font-family
width
- What is the purpose of the
id
attribute in HTML?
- It is used to select elements in CSS
- It is used to apply unique styles to elements
- It is used to define the structure of the document
- It is used to include external stylesheets
- How can you select elements with the class
even
in CSS?
- By tag name
- By class attribute
- By id attribute
- By attribute value
- Which property is used to change the width of an element in CSS?
color
background-color
font-family
width
- What is the purpose of the
margin
property in CSS?
- It controls the spacing external to an element
- It controls the spacing internal to an element
- It controls the width of an element
- It controls the height of an element
- Where can you find more information about CSS?
- W3Schools.com CSS Tutorial
- MDN Web Docs
- Stack Overflow
- GitHub Copilot
- Which selector is used to apply the same set of rules to multiple elements?
- Compound selector
- Nesting selector
- Direct descendant selector
- Universal selector
- How can you select
p
elements within anarticle
element in CSS?
- By tag name
- By class attribute
- By id attribute
- By nesting selectors
- What is the purpose of the
>
symbol in CSS?
- It is used to select elements by tag name
- It is used to select elements by
class
attribute - It is used to select elements by
id
attribute - It is used to select direct descendant elements
- Which language is used to control the interactive behavior of content on a web page?
- HTML
- CSS
- JavaScript
- Python
- What is the purpose of the
style
element in HTML?
- It is used to include external stylesheets
- It is used to define the structure of the document
- It is used to apply inline styles to elements
- It is used to control the interactive behavior of content
- How can you select elements with the class
featured
in CSS?
- By tag name
- By class attribute
- By
id
attribute - By
attribute
value
- Which property is used to change the background color of an element in CSS?
color
background-color
font-family
width
- What is the purpose of the
padding
property in CSS?
- It controls the spacing external to an element
- It controls the spacing internal to an element
- It controls the width of an element
- It controls the height of an element
- Which property is used to change the font size in CSS?
color
background-color
font-family
font-size
- What is the purpose of the
border
property in CSS?
- It controls the spacing external to an element
- It controls the spacing internal to an element
- It controls the width of an element
- It controls the border of an element
- The hexadecimal code #0000ff represents which color in CSS?
- Blue
- Red
- Green
- Fuchsia
- None of the above
- By default, which of the following are default behaviors of all elements with the ‘block’ display setting in CSS? (select all that apply)
- Stack one-on-top of the other with other elements
- Sit side-by-side with other elements
- Are only as wide as necessary to contain the content nested inside them
- Are as wide as possible within their container element
- All of the above
- By default, which of the following are default behaviors of all elements with the ‘inline’ display setting in CSS? (select all that apply)
- Stack one-on-top of the other with other elements
- Sit side-by-side with other elements
- Are only as wide as necessary to contain the content nested inside them
- Are as wide as possible within their container element
- All of the above
- The most useful types of elements for creating the structure and general layout of all web pages are:
- inline elements
- block elements
- radish elements
- deprecated elements
- What visual result will the following style cause…. (select all that apply)
h1 {
text-align: center;
}
- The text within the first h1 element will be centered
- The text within all h1 elements will be centered
- The first h1 element will be centered within its containing element
- All h1 elements will be centered within their containing elements
- All of the above
- What visual result will the following style cause…. (select all that apply)
p#second {
font-family: sans-serif;
}
- The text within the second p element will be displayed in the browser’s default sans-serif font
- The text within all p elements will be displayed the browser’s default sans- serif font
- The text within the p element with the class name “second” will be displayed the browser’s default sans-serif font
- The text within the p element with the id “second” will be displayed the browser’s default sans-serif font
- None of the above
- What elements could potentially be styled by the following CSS code? (select all that apply)
p#second a {
font-family: sans-serif;
}
- only one p element
- more than one p element only one a element
- more than one a element
- Which type of HTML element(s) could the following CSS code select for?
header div.pub h1#magazine_heading {
/*...*/
}
<header>
<div>
<h1>
<header>
,<div>
, and<h1>
- Which type of HTML element(s) could the following CSS code select for?
header,
div.pub,
h1#magazine_heading {
/*...*/
}
<header>
<div>
<h1>
<header>
,<div>
, and<h1>
- What will be the effect of the following CSS code on how
<p>
elements are rendered by the web browser?
p {
padding: 10px;
}
- The internal spacing between the edge of the
<p>
element and the content nested within the<p>
element will be set to 10 pixels. - The external spacing between the edge of the
<p>
element and any content surrounding it will be set to 10 pixels. - The border surrounding the p element will be set to be 10 pixels wide.
- The position of the left edge of the
<p>
element will be shifted to the right by 10 pixels from where it would normally be
- The difference between serif and sans-serif fonts is… (select all that apply)
- Serif fonts have small decorative lines attached to the end of the stroke of letters, whereas sans-serif fonts do not.
- Sans-serif fonts have small decorative lines attached to the end of the stroke of letters, whereas serif fonts do not.
- Serif fonts can be scaled to be larger or smaller, whereas sans-serif fonts cannot.
- Sans-serif fonts can be scaled to be larger or smaller, whereas serif fonts cannot.
- The hexadecimal color code “#00ff00” represents the color:
- Red
- Green
- Blue
- Yellow
- The hexadecimal number 1b is the same as the decimal number…
- 11
- 21
- 27
- 111
- The
<div class="clear">
element requires the following CSS rule to be applied to it, in order for it to serve its intended purpose:
- float: left;
- width: 960px;
- clear: both;
- margin: 0 auto;
- Which two of the following CSS rules would be required to be applied to the
<div class="container">
element, in order to illustrate its two main purposes in web page design? … (select two responses)
- float: left;
- width: 960px;
- clear: both;
- margin: 0 auto;
- The float property is used…
- to center any element on the page
- to prevent inline elements from sitting side-by-side
- to coerce block elements to sit side-by-side
- to load different style sheets at different browser widths
CSS Layout
- What CSS property can be used to restrict the width of a page?
display
width
margin
padding
- How can you center the contents of a container element?
width: 100%
margin: auto
display: flex
position: absolute
- What happens if you set the height of an element to a fixed size?
- The element adjusts its height to fit the contents.
- The layout becomes corrupted if the content exceeds the fixed height.
- The element becomes invisible.
- The element expands to fill the available space.
- What is the width of an element calculated as?
- Width + left border + right border + left padding + right padding
- Width + left border + right border + left margin + right margin
- Width + left border + right border + left padding + right padding + left margin + right margin
- Width + left padding + right padding + left margin + right margin
- Which CSS
display
value is used for block elements?
block
inline
none
static
- Which elements are commonly set to
display: block
by default?
header
,footer
,main
a
,strong
,em
ul
,ol
,li
div
,span
- What is the behavior of block elements?
- They consume as much width as they can and sit side-by-side with other elements.
- They consume only as much width as they need and refuse to sit side-by-side with other elements.
- They consume as much width as they can and happily sit side-by-side with other elements.
- They consume only as much width as they need and cannot sit side-by-side with other elements.
- Which elements are commonly set to
display: inline
by default?
header
,footer
,main
a
,strong
,em
ul
,ol
,li
div
,span
- What is the behavior of inline elements?
- They consume as much width as they can and sit side-by-side with other elements.
- They consume only as much width as they need and refuse to sit side-by-side with other elements.
- They consume as much width as they can and happily sit side-by-side with other elements.
- They consume only as much width as they need and cannot sit side-by-side with other elements.
- What are
div
andspan
used for?
- They have semantic meaning and are used to structure the content of a web page.
- They have no semantic meaning and are used to apply styles to content without changing its meaning.
- What is the purpose of the
.container
class in CSS layout?
- To restrict the page width
- To center the contents
- To set the height of the container
- To calculate the width of an element
- Which CSS
position
value should be used for general web page layout?
static
relative
absolute
fixed
- What is the main purpose of CSS Grid?
- To restrict the page width
- To center the contents
- To create the main skeletal structure of web pages
- To lay out the inner content pieces of a web page
- What is the main purpose of CSS Flexbox?
- To restrict the page width
- To center the contents
- To create the main skeletal structure of web pages
- To lay out the inner content pieces of a web page
- Which CSS property is used to adjust the width of a container in CSS Grid?
width
grid-template-columns
grid-template-areas
display
- Which CSS property is used to adjust the width of a container in CSS Flexbox?
width
flex-direction
gap
display
- What is the purpose of the
gap
property in CSS Flexbox?
- To restrict the page width
- To center the contents
- To create the main skeletal structure of web pages
- To set the spacing between inner elements
- Which CSS property is used to justify the inner elements within a Flexbox container?
width
flex-direction
gap
justify-content
- What is the purpose of the
header
element in HTML?
- To define a section of a web page
- To define a navigation bar
- To define the main content of a web page
- To define a header for a section or page
- What is the purpose of the
nav
element in HTML?
- To define a section of a web page
- To define a navigation bar
- To define the main content of a web page
- To define a header for a section or page
JQuery
- Which browser is currently the most popular by market share?
- Google Chrome
- Safari
- Mozilla Firefox
- Brave
- Who invented JavaScript?
- Brendan Eich at Netscape
- Bill Gates at Microsoft
- Tim Berners-Lee at the W3C
- Linus Torvalds at Linux
- Which browser was considered a pariah by many developers from the 1990’s thru the 2010’s?
- Google Chrome
- Safari
- Mozilla Firefox
- Internet Explorer
- Which framework can be used to smooth out browser implementation differences?
- Angular
- React
- Vue.js
- jQuery
- What type of events can JavaScript respond to?
- User actions only
- Browser actions only
- Time-based events only
- All of the above
- How can you handle a click event using JQuery?
- Using the
click
function - Using the
mouseover
function - Using the
mouseout
function - Using the
setTimeout
function
- How can you handle a mouseover event using JQuery?
- Using the
click
function - Using the
mouseover
function - Using the
mouseout
function - Using the
setTimeout
function
- How can you handle a mouseout event using JQuery?
- Using the
click
function - Using the
mouseover
function - Using the
mouseout
function - Using the
setTimeout
function
- How can you perform an action after a certain period of time has passed using JQuery?
- Using the
click
function - Using the
mouseover
function - Using the
mouseout
function - Using the
setTimeout
function
- How can you hide an element using JQuery?
- Using the
hide
function - Using the
show
function - Using the
fadeOut
function - Using the
fadeIn
function
- How can you show a hidden element using JQuery?
- Using the
hide
function - Using the
show
function - Using the
fadeOut
function - Using the
fadeIn
function
- How can you change the text nested within an element using JQuery?
- Using the
text
function - Using the
html
function - Using the
css
function - Using the
attr
function
- How can you change the style of an element using JQuery?
- Using the
text
function - Using the
html
function - Using the
css
function - Using the
attr
function
- How can you modify an element’s class using JQuery?
- Using the
addClass
function - Using the
removeClass
function - Using the
text
function - Using the
html
function
- How can you change the value of an attribute using JQuery?
- Using the
addClass
function - Using the
removeClass
function - Using the
text
function - Using the
attr
function
- How can you animate an element using JQuery?
- Using the
hide
function - Using the
show
function - Using the
fadeOut
function - Using the
animate
function
- Which browser is currently the second most popular by market share?
- Google Chrome
- Safari
- Mozilla Firefox
- Brave
- Which browser is currently the third most popular by market share?
- Google Chrome
- Safari
- Mozilla Firefox
- Brave
- Which browser was first released in 2011?
- Google Chrome
- Safari
- Mozilla Firefox
- Brave
- Which browser attempts to offer an alternative funding model for websites?
- Google Chrome
- Safari
- Mozilla Firefox
- Brave
Copyright and Linux
- What is the purpose of copyright?
- To protect the rights of creators and their original works
- To restrict access to information and knowledge
- To promote the sharing and collaboration of ideas
- To encourage the development of open source software
- What is copyleft?
- A legal mechanism that allows creators to retain all rights to their work
- A licensing approach that ensures derivative works are also open source
- A term used to describe the opposite of copyright
- A method of protecting intellectual property from unauthorized use
- Who is the creator of the Linux operating system?
- Richard Stallman
- Linus Torvalds
- Bill Gates
- Steve Jobs
- What is the origin of Linux?
- It was developed by a team of researchers at MIT
- It was created by Linus Torvalds as a hobby project
- It was a commercial operating system developed by IBM
- It was a fork of the Unix operating system
- What is the GNU organization?
- An organization that promotes the use of proprietary software
- An organization that develops open source software and advocates for free software
- An organization that enforces copyright laws
- An organization that supports the use of copyleft licenses
- What is the purpose of the GNU General Public License (GPL)?
- To restrict the use and distribution of software
- To promote the use of proprietary software
- To ensure that derivative works are also open source
- To protect the rights of software developers
- What is the difference between copyright and copyleft?
- Copyright protects the rights of creators, while copyleft promotes the sharing and collaboration of ideas
- Copyright restricts access to information, while copyleft ensures derivative works are also open source
- Copyright allows creators to retain all rights to their work, while copyleft allows for the free use and modification of software
- Copyright protects intellectual property from unauthorized use, while copyleft enforces copyright laws
- What is the significance of the GNU project in the development of Linux?
- The GNU project developed the Linux kernel
- The GNU project provided essential software components for the Linux operating system
- The GNU project was responsible for the creation of the Linux operating system
- The GNU project advocated for the use of proprietary software in the Linux community
- What is the relationship between Linux and Unix?
- Linux is a version of the Unix operating system
- Linux is a completely separate operating system from Unix
- Linux is based on the Unix operating system
- Linux and Unix are interchangeable terms for the same operating system
- What is the role of the Free Software Foundation (FSF) in the GNU project?
- The FSF provides financial support to the GNU project
- The FSF enforces copyright laws for the GNU project
- The FSF develops and maintains the GNU software components
- The FSF promotes the use of proprietary software in the GNU community
- What is the purpose of the Creative Commons licenses?
- To restrict the use and distribution of creative works
- To promote the sharing and collaboration of creative works
- To protect the rights of creators and their original works
- To encourage the development of open source software
- What is the difference between open source and free software?
- Open source software is available at no cost, while free software is not
- Open source software allows for the free use and modification of software, while free software is restricted by copyright
- Open source software promotes the sharing and collaboration of ideas, while free software restricts access to information
- Open source software is developed by the GNU project, while free software is developed by the Free Software Foundation
- What is the purpose of the Creative Commons Attribution license?
- To restrict the use and distribution of creative works
- To promote the sharing and collaboration of creative works
- To protect the rights of creators and their original works
- To encourage the development of open source software
- What is the significance of the GNU General Public License (GPL) in the open source community?
- The GPL restricts the use and distribution of open source software
- The GPL promotes the sharing and collaboration of open source software
- The GPL protects the rights of software developers
- The GPL allows for the free use and modification of open source software
- What is the purpose of the GNU Lesser General Public License (LGPL)?
- To restrict the use and distribution of software libraries
- To promote the sharing and collaboration of software libraries
- To protect the rights of software developers
- To ensure that derivative works of software libraries are also open source
- What is the difference between the GNU General Public License (GPL) and the GNU Lesser General Public License (LGPL)?
- The GPL applies to all types of software, while the LGPL applies only to software libraries
- The GPL restricts the use and distribution of software, while the LGPL promotes the sharing and collaboration of software