Web Development Final Exam (BSIT/BSCT III) - SMCC

¡Supera tus tareas y exámenes ahora con Quizwiz!

What symbol has to start an ID tag in CSS?

#

What is the correct HTML for making a checkbox?

<input type="checkbox">

What is the correct HTML for referring to an external style sheet?

<link rel="stylesheet" type="text/css" href="mystyle.css">

what do all variables start with?

All variables in PHP start with a $ sign symbol.

What is an Array?

An array can store one or more values in a single variable name.

What are looping statements used for?

Looping statements in PHP are used to execute the same block of code a specified number of times.

What are two different ways numeric array id's can be created?

Manually or automatically

where can a php script be placed in the document?

anywhere

when should the if else statement be used?

if you want to execute a set of code when a condition is true and another if the condition is not true

Which one is the correct way to type a conditional statement for executing some code if "I" is NOT equal to 5?

if(i!=5)

How do you write a conditional statement for executing some code if "I" is equal to 5?

if(i==5)

What do the include() or require() function allow you to do?

insert the content of a file into a PHP file before the server executes it

when should the else if statement be used?

is used with the if...else statement to execute a set of code if one of several condition are true

what is the purpose of the semi colon?

it is a separator and used to distinguish one set of instructions from another

What is the disadvantage of using the $_get variable?

the largest variable it can hold is 100 characters

What is the advantage of using the $_get variable?

the page can be bookmarked

what happens if the php file has an html extension instead of PHP?

the php code will not be executed

What is the advantage of validating a form on the server by posting to itself?

the user will then get the error messages on the same page as the form. This makes it easier to discover the error.

What is the switch statement used for in PHP?

to perform one of several different actions based on one of several different conditions.

The correct way of setting a variable in PHP:

$var_name = value;

What symbol has to start a class tag in CSS?

.(period)

how is a comment block made?

/* */

How do insert a comment in CSS?

/*this is a comment*/

What is the code to add a single line comment in JavaScript?

//single line

What is the correct DocType for HTML5?

<!DOCTYPE html>

What is the correct code for creating a hyperlink to a www.w3schools.com

<a href="http://www.w3schools.com">W3Schools</a>

What is the correct code to open www.google.com in a new window?

<a href=www.google.com target="_blank">

What is the correct code to add red as the background color?

<body style="background-color: red">

Between what two tags make the content visible?

<body></body>

What is the tag for inserting a break line?

<br>

Choose the correct HTML tag for the largest heading.

<h1>

What is the smallest heading tag?

<h6>

Where is the correct place to insert Javascript?

<head> & <body>

Where in an HTML document is the correct place to refer to an external style sheet?

<head> section

What is the correct HTML for inserting an image?

<img src="image.gif" alt="my picture"/>

What is the correct tag to make a list with numbers?

<ol>

What is the tag for a paragraph?

<p>

What is the correct syntax for referring to an external script called "majava.js"?

<script type="text/javascript" src="myjava.js">

Inside which HTML element do we put Javascript?

<script>

Which HTML tag is used to define an internal style sheet?

<style>

Identify 3 tags relating to tables.

<table><tr><td>

What is the tag to create a list with bullets?

<ul>

how is a php started and ended?

A PHP scripting block always starts with <?php and ends with ?>

what is a numeric array?

A numeric array stores each element with a numeric ID key.

what are parameters?

A parameter is just like a variable.

What is a string variable used for?

A string variable is used to store and manipulate a piece of text.

What kinds of characters can a variable name contain?

A variable name can only contain alpha-numeric characters and underscores (a-z, A-Z, 0-9, and _ )

in php how must a variable name start?

A variable name must start with a letter or an underscore _

Why is the include() and require() function useful?

Because it can save a considerable amount of time by allowing you to change only a couple of files when headers,footers or menus have to be changed for a website instead of having to maually change all the pages.

What does CSS stand for?

Cascading Style Sheet

how are elements in an array accessed?

Each element in the array has its own ID so that it can be easily accessed.

What methods can the $_request variable be used with?

GET and POST

What does HTML stand for?

Hyper Text Markup Language

What are associative arrays?

In An associative array, each ID key is associated with a value.

What is a multidimensional array?

In a multidimensional array, each element in the main array can also be an array. And each element in the sub-array can be an array, and so on.

What are the advanteages to using $_POST

Information sent from a form with the POST method is invisible to others and has no limits on the amount of information to send.

What is the advantage of arrays?

Instead of having many similar variables, you can store the data as elements in an array.

What are the 3 ways to insert CSS into your HTML document?

Internal, External, Inline

What is the primary advantage of using the switch statement?

It avoids avoid long blocks of if..elseif..else code.

There are three different kinds of arrays?

Numeric, associative, and multidimensional

what are operators used for?

Operators are used to operate on values.

how are php files returned to the browser?

PHP files are returned to the browser as plain HTML

What does php stand for?

PHP stands for PHP: Hypertext Preprocessor

What are server side includes?

Server Side Includes (SSI) are used to create functions, headers, footers, or elements that will be reused on multiple pages.

What is the the $_GET Variable

The $_GET variable is an array of variable names and values sent by the HTTP GET method. The $_GET variable is used to collect values from a form with method= get

What is the the $_post Variable?

The $_POST variable is an array of variable names and values sent by the HTTP POST method. The $_POST variable is used to collect values from a form with method= post .

what are the $_get and $_post variables used for?

The PHP $_GET and $_POST variables are used to retrieve information from forms, like user input.

what is the purpose of the $_REQUEST Variable?

The PHP $_REQUEST variable contains the contents of both $_GET, $_POST, and $_COOKIE.

What is the PHP date() function used for?

The PHP date() function is used to format a time or a date.

How does the include() or require() function handle errors?

The include() function generates a warning (but the script will continue execution) while the require() function generates a fatal error (and the script execution will stop after the error).

How are the include() or require() function different?

The two functions are identical in every way, except how they handle errors

What are variables used for?

Variables are used for storing values, such as numbers, strings or function results, so that they can be used many times in a script.

how is a single line comment made in php?

With //

How do you write "Hello World" in an alert box?

alert("Hello World")

What is the most important thing to notice when dealing with HTML forms and PHP?

any form element in an HTML page will automatically be available to your PHP scripts.

What kinds of different operators exist?

arithmetic, assignment, comparison, and logical

Which property is used to change the background color?

background-color:

What is the code to change the text color of an element?

color:

What is the correct JavaScript syntax to write "hello world"?

document.write("Hello World")

what are two basic statements to output text with PHP?

echo and print

What CSS property controls the text size?

font-size:

How do you add a background color to all <h1> elements?

h1{background-color:#FFFFFF}

What is the CSS to center all <h1> headings using a width 80%?

h1{margin: auto; width:80%}

What does the for statement do?

loops through a block of code a specified number of times

What does the foreach statement do?

loops through a block of code for each element in an array

What does the while statement do?

loops through a block of code if and as long as a specified condition is true

What does the do..while statement do?

loops through a block of code once, and then repeats the loop as long as a special condition is true

should a variable name contain spaces?

no

in php does a variable need to be declared (created) before being set?

no, php automatically creates the variable and sets it to the correct type.

What is the correct CSS syntax for making all the <p> elements bold?

p{font-weight: bold}

is PHP server side or client side scripting language?

server side

What is another disadvantage of using the $_get variable?

since the information is transmitted and visible in the address bar is is not secure for personal data

What is the inline style to make an element centered?

style="text-align: center"

If you want to select one of many blocks of code to be executed which statement should be used?

switch

What is the concatenation operator used for?

to put two string values together.

What is another way functions can be used?

to return values

HTML 5 is less strict than previous versions of HTML or XHTML.

true

HTML is not case sensitive

true

Javascript is case sensitive

true

Script Tag is not needed on an external script page?

true

What is meant by the term strongly typed?

variables have to be defined before they can be used

What are the looping statements in PHP?

while, do while , for and foreach

how must each php code line end?

with a semi colon

if a variable name is more than one word how should it be formatted?

with an underscore between words or with the second word capitalized


Conjuntos de estudio relacionados

Estructura Y Función de las Proteínas

View Set

Human Resource Management Chapter 3

View Set

C2 - Unit 2.2.1 Metals and Non-metals

View Set

Standard form, expanded form, word form, and standard notation

View Set

POLICY RIDERS, Provisions, Options & Exclusion

View Set

Events Leading to the Civil War (AMSCO Chapter 13)

View Set