wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

1 курс

Total questions: 80

Worksheet time: 51mins

Name
Class
Date
1.

When a browser connects to a web server to retrieve a document, what is the default TCP/IP port that is used?

(a)  

2.

When a browser connects to a web server to retrieve a document, what command is sent to the server?

(a)  

3.

Which of the HTTP headers does the browser look at to decide how to display the retrieved document?

a)

Content-length

b)

Content-type

c)

Format

d)

ETAG

e)

Location

Display-type

4.

What does the second "T" of HTTP stand for?

a)

Transfer

b)

Transport

c)

Transpose

d)

movemenT

5.

Which of the following is NOT part of a Uniform Resource Locator?Document

a)

Document

b)

Protocol

c)

Host

d)

Operating System

6.

Which HTML tags typically generate a request to retrieve a document?

a)

a

b)

b

c)

img

d)

h1

e)

p

div

7.

What standards organization publishes many of the documents that describe the protocols we use on the Internet?

a)

IETF

b)

6-Sigma

c)

RIA

d)

IRR

e)

Educause

8.

  What is true about the following HTML?

<a href="http://www.dr-chuck.com/page2.htm">Second Page</a> 

a)

1)       The reference is a relative reference

b)

2)       The reference is an absolute reference

c)

3)       The text "second page" is improperly placed and will not be seen

d)

4)       The HTML is improperly formed and there will be a syntax error

9.

What do you put at the beginning of an HTML file to inform the browser which variant of HTML you will be using in this document?

a)

1)       DOCTYPE

b)

2)       <body>

c)

3)       <html>

d)

4)       <xs:sequence>

e)

5)       <?xml version>

6)       <meta type>

10.

What is the name of the tag that is used in a document's <head> area to set the text shown in the tab of the browser or title bar?

a)

<title>

b)

<title>

11.

In HTML, what attribute is used to indicate text that will be shown if an image is not loaded or read to a user that is using a screen reader?

a)

alt

b)

alt

12.

For the following HTML:

1

<img src="csev_ian_dolphin_small.jpg" alt="Photo Credit: Ian Dolphin" width="160" align="middle">

What is an example of an "attribute"?

a)

1)       src

b)

2)       http://

c)

3)       /a

d)

4)       a

e)

5)       Second Page

13.

How do you show a less-than (<) in an an HTML page?

a)

<!-- < -->

b)

<<< 

c)

//less-than

d)

<less-than>

e)

&lt;

14.

What does the <ul> tag accomplish?

a)

Indicates that a sequence of HTML is certified to be safe

b)

Begins an unordered list

c)

Reduces the space between lines (leading)

d)

Enables upper-lower text

15.

In a table, what is the general order of tags from outer to inner when constructing a table?

 

a)

<table> <tr> <td>

b)

<table> <td> <tr>

c)

<table> <td> <table>

d)

<tr> <table>

e)

<table> <row>

<column>

<td> <tr> <table>

16.

Which of the following is not a way to include CSS in an HTML page?

a)

Using the <style> tag inline in the HTML document

b)

External Style Sheet

c)

Directly on an HTML tag using the style= attribute

d)

Using the <font> tag to enclose other tags

17.

Which HTML tag does nothing to the text it surrounds and has as its sole purpose to create a "handle" so as to be able to apply CSS to the text?

a)

<span>

b)

<span>

18.

Why is there more than one font listed in the following CSS rule?

1.       body { font-family: "Trebuchet MS", Helvetica, Arial, sans-serif; }

a)

They are the preferred fonts for Windows, Mac, Linux, and "Other" systems

b)

This is a syntax error, the rule should start with "font-name"

c)

This is a syntax error, square braces [ ] should be used for the CSS rule

d)

They are listed in descending preference order if fonts are not present in the browser

19.

Which CSS selector controls how a link (anchor tag) looks while the user mouses over the link (i.e. while hovering)?

a:hover

a)

a:hover

b)

a

20.

Which of these CSS rules make text appear in a bold face font?

 

a)

strong: yes

b)

font-weight: bold

c)

font-bold: on

d)

font-expand: 10%

e)

font-style: bold

21.

What CSS selector would style a tag that looks like this:

1 < ... class="puppy">

a)

puppy { ...

b)

puppy !important { ...

c)

_puppy { ...

d)

.puppy { ...

e)

%puppy { ...

22.

What CSS rule allows you include a tag in markup but hide it from view in the browser?

 

a)

font-size: -1px;

b)

right: 0;

c)

status: off;

d)

visibility: hidden;

e)

display: block;

23.

Which of the following CSS selectors is between the content area and the border? (CSS box model)

 

a)

edge

b)

padding

c)

margin

d)

perimeter

e)

pixels

24.

What tag is used to import a style sheet into an HTML document?

a)

<link>

b)

<>

25.

What does PHP stand for?

a)

Private Home Page

b)

Personal Home Page

c)

PHP: Hypertext

d)

Preprocessor

e)

Personal Hypertext Processor

26.

PHP Server scripts are surrounded by?

a)

<&>...</&>

b)

<script>...</script>

c)

<?php ... ?>

d)

<?php>...</?>

27.

The PHP syntax is most similar to:

a)

Perl and C

b)

VBScript

c)

JavaScript

d)

Fortran

28.

Which of the following are operators in PHP?

a)

===

b)

_:

__

c)

!=

d)

.+

e)

++

29.

What is the output of the following?

3  echo "y = $y x = $x";

a)

y = 25 x = 13

b)

y = 24 x = 13

c)

y = 24 x = 12

d)

y = $y x = $x

30.

What value will var_dump show that echo will not show?

a)

Ответ =       string(5) "Hello"

b)

Ответ =       string(5) "Hello"

31.

What is a correct way to add a comment in PHP?

a)

\..\

b)

<comment> ...

c)

</comment>

d)

<!-- ... --\>

e)

/* ... */

32.

All variables in PHP start with [_________] symbol.

a)

$

b)

$$

33.

What is the value returned by: (int) 9.9 - 1

a)

8

b)

8.1

34.

Use the [_____] operator to test if two values are identical in both value and type.

a)

===

b)

==

35.

What is the value of $x?

$x = 1200 + "34";

a)

Ответ - 1234

b)

Ответ - 1234

36.

In PHP you can use both single quotes ( ' ' ) and double quotes ( " " ) for strings.

a)

True

b)

False

37.

PHP and HTML cannot be intermingled in the same file.

a)

True

b)

False

38.

Which escape sequences can be used in single quoted ( ' ) strings in PHP?

a)

\\

b)

\'

c)

\"

d)

\n

e)

\r

39.

You cannot run PHP files from the command line.

a)

True

b)

False

40.

You can run PHP files on a server.

a)

True

b)

False

41.

In PHP, variable names are case sensitive.

a)

True

b)

False

42.

In PHP, functions names are not case sensitive.

a)

True

b)

False

43.

In PHP arrays can either be key / value (i.e. an associative array) or indexed by integers (i.e. a linear array).

a)

True

b)

False

44.

Which symbol is used to associate a key to a value in an associative array?

a)

==

b)

->

c)

=>

d)

>> 

45.

Fill in the blank to echo 'Arrays'

2  echo ________;

a)

$stuff['Arrays']

b)

$stuff['course']

c)

$stuff[1]

d)

$stuff['topic']

46.

What is the output of

2 echo isset($stuff['section']);

 

a)

There is no output

b)

0

c)

1

True

False

d)

True

e)

False

47.

In PHP you cannot make an array of associative arrays.

a)

True

b)

False

48.

The [ (a)   ] function is used to rearrange an array in random order.

49.

Which of these are built-in sorting functions provided by PHP?

a)

sort()

b)

asort()

c)

ksort()

d)

isort()

50.

What function is used to sort the array in alphabetical order of the keys?



(a)  

51.

What function is used to sort the values in array and keep the keys intact?



(a)  

52.

What function can be used to split a string into an array words based on a delimiter? For instance, create a three element array from the string 'I am great!!!'.



(a)  

53.

var_dump will display the name, key/value pairs, and data types of a variable.

a)

True

b)

False

54.

Why should you use functions?

 

a)

Organize your code

b)

Break complex code into logical chunks

c)

Avoid repetitive code

d)

To make it harder for others to use your code

55.

Which keyword defines a new function?

a)

define

b)

new functions

c)

new

d)

function

56.

Return values are type-specific in php functions (a function only returns a value of a specified data type.)

a)

True

b)

False

57.

What output does the following code produce?

1 function double($val){ $val = $val * 2; return $val; } $val = 15; $dval = double($val); echo "Value = $val Doubled = $dval";

 

a)

Value = 30 Doubled = 30

b)

Value = 15 Doubled = 15

c)

Value = 15 Doubled = 30

d)

Value = Doubled =

58.

Which keyword is used to use code from one php file into a different PHP file?

a)

include

b)

point

c)

add

d)

append

59.

Which function prints out the internal configuration capabilities of your particular PHP installation?

a)

phpinfo()

b)

info()

c)

phpver()

d)

version()

60.

Adding an ampersand ( & ) to a function parameter indicates that you are using call by [ (a)   ] for that parameter.

61.

The keyword [ (a)   ] will expand the scope of a variable outside of its function.

62.

The [ (a)   ] function is used to check if a function already exists or not.

63.

It is common to use uppercase and/or long names for global variables to avoid confusion or mistaken reuse.

a)

True

b)

False

64.

A properly formatted form element will always include an action attribute.

a)

True

b)

False

65.

Web crawlers follow anchor tags <a href=".... and may even fill in forms with a method of GET, but will never submit a form with a method= attribute of [ (a)   ].

66.

Within PHP the [ (a)   ] array merges $_GET and $_POST data.

67.

It is good practice for a web application to change data on a GET request.

a)

True

b)

False

68.

The [ (a)   ] attribute of an text input field will set a default value for the field.

69.

The function htmlentities will transform an ampersand character ( & ) into



(a)  

70.

The input type [ (a)   ] will display your form input as dots.

71.

To connect the behavior of multiple radio buttons (e.g. to make sure that only one is "on" at the same time), make sure to give each radio button the same [ (a)   ] attribute.

72.

To set a checkbox as checked by default, use the [ (a)   ] attribute.

73.

To set a default option in a drop-down list, use the [ (a)   ] attribute.

74.

All browsers treat unknown input types as type= [ (a)   ] "

75.

In HTML5, the email input type doesn't validate the value until you press



(a)  

76.

Post data is appended to the URL.

a)

True

b)

False

77.

In a PHP script, it is generally a good idea to process any incoming POST data before you produce page output.

a)

True

b)

False

78.

"View Page Source" allows you to see the HTML code.

a)

True

b)

False

79.

"View Page Source" allows you to see the PHP code.

a)

True

b)

False

80.

"View Page Source" allows you to see the output of the PHP code.

a)

True

b)

False