Programming Test 2
All variables in PHP start with which symbol?
$
How do you get information from a form that is submitted using the "get" method?
$_GET[];
Which superglobal variable holds information about headers, paths, and script locations?
$_SERVER
How do you create an array in PHP?
$cars = array("Volvo", "BMW", "Toyota");
What is the correct way to add 1 to the $count variable?
$count++;
Which one of these variables has an illegal name?
$my-Var
Yellow has the triplet ____. (0, 0, 0) (255, 255, 0) (0, 255, 255) (255, 0, 255)
(255, 255, 0)
What is a correct way to add a comment in PHP?
/*...*/
In the preceding figure, the item number ____ sets the background color to dark and the text color to white or semi-transparent white. 1 2 3 4
1
In the hexadecimal system, 16 is expressed as ____. 1F F 10 1
10
In the hexadecimal system, 21 is expressed as ____. 1F F 15 F1
15
CSS supports the ___ basic color names. 16 64 256 216
16
In the preceding figure, the item number _____ displays the shortcut property. 1 2 3 4
2
If an element contains 12pt text, a length of 2em equals ____. 24pts 12pts 4pts 2pts
24pts
What is the correct way to end a PHP statement?
;
What is the correct way to include the file "time.inc" ?
<?php include "time.inc"; ?>
PHP server scripts are surrounded by delimiters, which?
<?php...?>
Which operator is used to check if two values are equal and of same data type?
===
The Web font format that supports Internet Explorer is _______. TrueType/OpenType Embedded OpenType Scalable Vector Graphics Web Open Font Format
Embedded OpenType
In PHP, the only way to output text is with echo.
False
Include files must have the file extension ".inc"
False
When using the POST method, variables are displayed in the URL:
False
Graphic designers consider ____ easier to use because it allows you to guess at an initial color based on hue and then tweak the saturation and lightness values to fine-tune the final color. HTML CSS HSL HTM
HSL
____ is the space between lines of text. Tracking Kerning Leading Dithering
Leading
_____ defines how much of the colors below the surface of the current object show through to affect its appearance. Clarity Saturation Lightness Opacity
Opacity
What does PHP stand for?
PHP: Hypertext Preprocessor
The PHP syntax is most similar to:
Perl and C
______ measures the intensity of the chosen color and ranges from 0% (no color) up to 100% (full color). Hue Saturation Lightness Darkness
Saturation
Absolute measurements are appropriate when you know the physical properties o fan output device and want to fix a size to a specific value. (T/F)
True
In PHP you can use both single quotes ( ' ' ) and double quotes ( " " ) for strings:
True
PHP allows you to send emails directly from a script
True
PHP can be run on Microsoft Windows IIS(Internet Information Server):
True
The die() and exit() functions do the exact same thing.
True
The if statement is used to execute some code only if a specified condition is true
True
____ units define a font size using one of five standard units of measurement. Relative Absolute Standard Uppercase
absolute
The color scheme that uses two hues close to one another on the color wheel in which one color is the dominant color and the other is a supporting color used only for highlights and nuance is _____. triad tetrad analogic monochrome
analogic
CSS supports styles to define both the text and ______ color for each element on your page. font background style forecolor
background
To set the foreground or text color of an element, use the following property: text: color; forecolor: color; color: color; backcolor: color;
color: color;
A typeface that mimics handwriting with highly stylized elements and flourishes,best used in small doses for decorative page elements, is ______. serif monospace fantasy cursive
cursive
Each child element may contain children of its own and so forth down the hierarchy, creating a set of ______ elements that are all descended from a common parent. descendant child parent sibling
descendant
Many Web browsers now include _______ tools to allow page designers to track each style back to its source. designer planner developer creator
developer
How do you write "Hello World" in PHP
echo "Hello World";
One commonly used relative unit is the ____ unit. in ft em en
em
Unlike an external style sheet, a(n) _______ style sheet is applied only to the Webpage in which it is placed. linked internal embedded integrated
embedded
The style sheet rules in a(n) ________ style sheet take precedence over any rules set in the browser's internal style sheet or in a user-defined style sheet. internal outside embedded external
external
A color value is an alphabetic expression that describes the properties of a color. (T/F)
false
Links that are underlined or highlighted only when the mouse pointer hovers over the linked text display what is known as the hover over effect. (T/F)
false
Style sheets cannot be as long and complicated as HTML files. (T/F)
false
Styles set by the author of a Web page and stored in an internal style sheet are loaded after internal and user-defined style sheets. (T/F)
false
The subscript and superscript styles lower or raise text vertically, as well as resize it. (T/F)
false
Web pages are unstructured documents in which elements are nested within other elements,forming a hierarchy of elements. (T/F)
false
What is the correct way to open the file "time.txt" as readable?
fopen("time.txt","r");
When referenced by the font-family property, a specific font refers to a font ______ that is stored on a user's computer. definition style format color
format
What is the correct way to create a function in PHP?
function myFunction()
Browsers recognize five ____ font groups. specific monospace generic designed
generic
Extending the first line of text to the left of the text block creates a ____ indent. tracking kerning leading hanging
hanging
CSS allows RGB values to be entered as ____. decimals hexadecimals WYSIWYG values RBG values
hexadecimals
____ is the tint of the color and is based on the color's location on the color wheel. Hue Saturation Lightness Darkness
hue
Two attributes, ______, are often key in targeting styles to a specific element or group of elements. id and char id and class id and type id and elem
id and class
A user could change the font size assigned to paragraph and heading text, set foreground and background colors, and specify whether or not to display _____ images. outline inline clip art graphic
inline
The amount of space between pairs of letters is referred to as the ____. tracking dithering kerning pacing
kerning
If two style rules have equal specificity, and thus equal importance, then the one that is defined _____ in the style sheet is the one used. last first second third
last
______ measures the brightness of the color and ranges from 0% (black) up to100% (white). Hue Saturation Lightness Darkness
lightness
The @import rule has the same impact as adding multiple ____ elements to the HTML file. connection link contact integrated
link
A typeface in which each character has the same width and is often used to display programming code is ______ monospace serif cursive fantasy
monospace
To prevent your browser from displaying address text in italic, you can set the font-style property to _____. bold normal semi-italic semi-bold
normal
A _____ element is an element that contains one or more other elements, which are child elements. family sibling parent descendant
parent
With semi-transparent colors, the final color rendered by a browser depends on the background color of the ______element. parent child sibling descendant
parent
A(n) ____ represents a single dot on the output device. element icon link pixel
pixel
The default unit of length for kerning and tracking is the ____. pica pixel point inch
pixel
If you use a hexadecimal value for a color, you preface the hexadecimal string with a(n) ____. pound symbol ampersand question mark exclamation point
pound symbol
A technique known as ______ enhancement places code conforming to older standards before newer properties. color progressive text opacity
progressive
Color also evokes an emotional response, in which certain colors are associated with particular feelings or concepts, such as the color ____ for assertive, powerful, sexy, and dangerous. black orange blue red
red
____ units express font size relative to the size of other objects within the Web page. Absolute Relative Standard Output
relative
A general rule for printing is to use ______ fonts for headlines and serif fonts for body text. serif sans-serif monospace cursive
sans-serif
One of the great advantages of relative units like the em unit is that they can make your page ______, allowing the page to be rendered the same way no matter what font size is used by the browser. expandable collapsable flexible scalable
scalable
A typeface in which a small ornamentation appears at the tail end of eachcharacter is _____. sans-serif serif monospace fantasy
serif
How do you create a cookie in PHP?
setcookie()
Two child elements that share the same parent are referred to as ______ elements. parent sibling child descendant
sibling
One reason to use the class attribute is to assign the same _____ to multiple elements that belong to the same class. rule format style theme
style
An additional factor in applying a style sheet is that properties are passed from a parent element to its children in a process known as __________. style sheets an embedded style sheet style inheritance style link
style inheritance
Inline styles are styles applied directly to specific elements using the style attribute<element style="style rules"> ... </element>where element is the HTML element and _______ are CSS styles applied to that element. style rules element element style style
style rules
Style comments can also be added to embedded style sheets as long as they are placed between the opening and closing<style> ______. markers tags links placeholders
tags
The _____ value of the vertical-align style aligns the bottom of the element with the bottom of the font of the surrounding content. baseline bottom text-bottom sub
text-bottom
A generic font describes the general appearance of a typeface, but does not rely on a specific font definition. (T/F)
true
By default, browsers offset ordered and unordered lists from the surrounding text. (T/F)
true
CSS also allows RGB values to be entered as hexadecimal numbers. (T/F)
true
Good management skills are as crucial to good Web design as a well-chosen color or typeface. (T/F)
true
In every version of CSS, you apply a style rule containing a list of style properties to an element or a group of elements known as a selector. (T/F)
true
List style types can be used with contextual selectors to create an outline style based on nested lists. (T/F)
true
One advantage of user-defined style sheets is that they make the Web more accessible to visually impaired users who may require larger fonts or the absence of clashing color schemes. (T/F)
true
Saturation measures the intensity of the chosen color and ranges from 0% (no color) up to 100% (full color). (T/F)
true
The exact order in which external style sheets and embedded style sheets are processed by the browser depends on the order in which they are listed within the HTML file. (T/F)
true
The first style sheet interpreted by the browser is the one built in to the browser itself. (T/F)
true
To render a document, the device displaying the page needs a style sheet that specifies the appearance of each page element. (T/F)
true
Without underlines, there is no visual clue that the links in the navigation list act as hypertext. (T/F)
true
An external style sheet is included by adding the link element<link href="url" rel="stylesheet" type="text/css" />to the document head, where ______is the URL of the external style sheet file. stylesheet text/css url href
url
Adding all three primary colors-red, green and blue-at maximum intensity produces the color _____, while adding any two of the three primary colors at maximum intensity produces the trio of complementary colors—yellow, magenta, and cyan. white blue lime black
white
The style rule* {color: blue;}uses the asterisk (*) selector—also known as the ______ selector—to select all elements in the document. character text wildcard object
wildcard