CGS2835- FINAL EXAM
Which of the following SQL statements will fetch the Willis record from this customer table?
SELECT * FROM customer WHERE last_name="Willis"
To which generic font family does the font used in this sentence belong?
San-serif
Which of the following is a shade of blue using hexadecimal Red, Green, Blue codes?
#1144FF
Which of the following is a valid way to style the following HTML code so that the text will appear blue? <h1 id = "aboutme">
#aboutme { color: blue; }
Which of the following will correctly select a divider with id="navigation" in jQuery?
$("#navigation")
Which of the following is a valid way to style the following HTML code so that the text will appear red? <h1 class = "heading">
.heading { color: #FF0000; }
Where is the following Web page located on iSpace - http://iSpace.ci.fsu.edu/~glm04/webdev/index.html ?
/home/glm04/html/webdev/index.html
Log into ispace.ci.fsu.edu using SSH (Secure shell on windows, ssh program on terminal on mac). Type pwd. What directory are you in? (username replaced with your FSUID)
/home/username
Now that you are on ispace in your home directory, type "cd html/webdev/" without quotes What directory are you in (username replaced with your FSUID) ? (The full directory path that you see when you type "pwd")
/home/username/html/webdev
If a Web page is stored on iSpace in /html/wad/mypage and references an image like this: <img src="images/mypic.jpg" alt="my picture" /> where should that image file be located on ispace?
/html/wad/mypage/images/mypic.jpg
Which of the following is used to signify the start of a comment in HTML code?
<!--
Which of the following is a properly formed hyperlink to FSU Web site?
<a href="http://www.fsu.edu">FSU</a>
Which of the following is correct syntax for an in-line style method?
<body style="background-color: #FF0000;">
Which of the following lines of code would make an error in the HTML validator?
<h1>Welcome to my Web page!<br /><p>Glad you are here!</h1></p>
Which of the following will properly display "Yikes!" (without quotes) in a large italics font?
<h2><em>Yikes!</em></h2>
Which of the following is correct syntax for the internal css method?
<html> <head> <title>Example</title> <style type="text/css"> body {background-color: #FF0000;} </style> </head> <body> <p>This is a red page</p> </body> </html>
Which of the following properly identifies the main parts of a Web page?
<html><head><title></title></head><body></body></html>
An HTML form can take text data from a client using the following tag:
<input type="text">
Which of the following properly represents an ordered list with three items?
<ol><li></li><li></li><li></li></ol>
Which of the following creates a 2x2 table in proper XHTML code?
<table><tr><td></td><td></td></tr><tr><td></td><td></td></tr></table>
What new tags did HTML5 introduce from previous versions of HTML?
<video> and <audio>
Model-View-Controller
A common method for organizing complex applications requiring a user interface Model: Database, stores of information, queries information Controller: Handles requests, processes information View: Renders information to the client
What is jQuery?
A library of JavaScript functions which make coding interactive web behaviors easier than plain JavaScript
Which of the following is NOT a benefit of CSS?
Allows the Web developer to load page content dynamically.
What does AMP stand for?
Apache, MySQL, PHP
A name given to a CSS class or id can have spaces. (e.g. <div id="my divider">)
FALSE
Java is the same programming language as JavaScript.
FALSE
PHP code embedded in an html file typically runs in the browser on the client PC.
FALSE
PHP scripts are executed on the client.
FALSE
What does CSS stand for?
Cascading Style Sheet
What does JavaScript provide for web applications?
Client side dynamic processing, interactivity, and behaviors
Code blocks placed in JavaScript functions and if/else statements are surrounded by what characters?
Curly Braces {}
Which SQL command deletes rows from tables?
DELETE FROM
What does the acronym DOM stand for?
Document Object Model
Processing $_GET from a URL
Getting the data on page.php: $id = $_GET['id'];
What SQL command inserts rows of data into a table?
INSERT INTO
Which of the following is correct syntax for an external style sheet utilizing the id selector?
In the css file: #c2 { color: red; } In the html file: <h2 id="c2">Chapter 2</h2>
Which of the following is correct syntax for an external style sheet utilizing class selectors? a { color: blue; } a.whitewine { color: #FFBB00; } a.redwine { color: #800000; }
In the html file: <p>Grapes for white wine:</p> <ul> <li><a href="ri.htm" class="whitewine">Riesling</a></li> <li><a href="ch.htm" class="whitewine">Chardonnay</a></li> <li><a href="pb.htm" class="whitewine">Pinot Blanc</a></li> </ul> <p>Grapes for red wine:</p> <ul> <li><a href="cs.htm" class="redwine">Cabernet Sauvignon</a></li> <li><a href="me.htm" class="redwine">Merlot</a></li> <li><a href="pn.htm" class="redwine">Pinot Noir</a></li> </ul>
The following HTML form and PHP scripts are not working for some reason. What is the problem? form.html <html> <body> <form action="welcome.php" method="get"> Name: <input type="text" name="name" /> Age: <input type="text" name="year" /> <input type="submit" /> </form> </body> </html> welcome.php <html> <body> Welcome <?php echo $_POST["name"]; ?> .<br /> You are <?php echo $_POST["age"]; ?> years old. </body> </html>
Inconsistant variable names. The form has "name" and "year" while the POST variable is looking for "name" and "age"
Which of the following is NOT true about PHP and MySQL?
PHP and MySQL only run on the Unix platform running Apache Web server.
What programming languages are commonly used on the web server?
PHP, Python, Perl, Ruby
Which SQL command allows you to read rows of data from a table?
SELECT
PHP
Server-side scripting Modular design with include('phppage.php');
An HTML file can link in multiple CSS style sheets.
TRUE
Consider the following code: <p>Early to bed and early to rise makes a human healthy, wealthy, and wise.</p> If you wanted to apply a style to the word "human" in the above code, you would use <span> rather than <div>.
TRUE
HTTP is the protocol used to request and receive resources on the web in web browsers.
TRUE
JavaScript code can be used by an HTML page on-page in the body, head and by including it externally using the script tag.
TRUE
Javascript code embedded in an html file typically runs in the browser on the client PC.
TRUE
Names for JavaScript variables cannot have spaces and are case sensitive. For example, (var Me;) is different than (var me;)
TRUE
One css file can be used to apply styles to several html pages?
TRUE
Which of the following is NOT true of HTML?
Tags must always be in quotes.
What does jQuery select objects from on a page?
The DOM
What is going on with this URL?: http://iSpace.ci.fsu.edu/username/mysite/index.html?name=ken "
The browser is passing data to an application on the server using HTTP GET, the variable "name" is set to "ken
Processing $_POST How do you create and process a form?
The form: <form action="controller.php" method="post"> <input type="text" name="dataname"> </form> The controller for this form (controller.php): $data = $_POST['dataname']; // process this $data (insert into database, display on page, whatever it is you want to do with the data.
What is the purpose of CSS?
To specify the visual design of Web pages.
Which SQL command updates a row of data that currently exists in a table?
UPDATE
When I go to www.amazon.com, I am greeted with my "Hello, John Smith. We have recommendations for you". What technologies allow Amazon to know who I am and what I like?
Web browser, Web server, Cookies, Server-side program, Database
What organization works to develop standards for the Web such as HTML, XML, and CSS?
World Wide Web Consortium (W3C)
"cat" is a program which prints out the contents of a file to the command prompt. I have a file in /home/glm04/unixquiz called secret.txt Type into your command line on iSpace: cat /home/glm04/unixquiz/secret.txt What does this file say?
You can now use UNIX!
Next, go into your unix directory, and create a file called index.html using pico. So, you will have a file /home/username/html/webdev/unix/index.html Type your name into the file index.html before saving and exiting pico. How do you do this?
cd unix pico index.html Type in your name Press Control-O to save Press Enter for the filename index.html Press Control-X to exit pico
If you go to a Web site with the URL www.anysite.com what is the likely name of the Web page file that is presented?
index.html
When a person calls up www.fsu.edu in their Web browser, what is delivered by the Web server?
index.html along with any image files, css files, and other associated files that it requires to display as designed
Now that you are in your webdev folder, create a directory. What is the correct command to make a new directory called "unix"?
mkdir unix
Which of the following is the correct sequence of events for adding a record to a MySQL database using PHP?
mysql_connect() mysql_select_db() mysql_query()