web dev

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/41

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

42 Terms

1
New cards

A web page is a document that is viewed in a web browser. A collection of related web pages are organized into a website. A web server is a program that serves web pages to web browsers.

true

2
New cards

A domain name is a name for a payment system, such as the name google.com for the googlepay.

true

3
New cards

Only a registered business may register an unused domain name with a domain name registrar.

false

4
New cards

HTTPS was an early way for transferring files over the Internet. Users used HTTPS programs to connect to servers, look at listings of available documents, and download documents of interest.

false

5
New cards

HipText markup language (HTML) is the standard markup language for web documents.

false

6
New cards

In the early 1990s, was working at a Swiss research institute named CERN and developed a more convenient way for computers to communicate files over the Internet.

Tim Berners-Lee

7
New cards

Many addresses do not include a filename, but simply point to a directory, like these:
http://www.example.com
http://www.example.com/resume/

true

8
New cards

Developing web pages requires knowledge of disabilities, assistive technologies and software used by users with disabilities, and following design practices to ensure content is compatible with those assistive tools.

accessible

9
New cards

Your web pages will be viewed on all manner of devices, large and small, fast and slow, visual and non-visual. One of the challenges of being a web designer is creating a good experience regardless of the browsing device.

true

10
New cards

Domain names are hierarchical. A domain name belongs to one of numerous top-level domains (TLD), such as .com, .net, .org, .edu, and .gov. Also, each country is assigned a unique two-letter country code top-level domain (ccTLD) like .uk (United Kingdom), .ru (Russia), and .de (Germany). ICANN, the organization that manages TLDs, now allows companies and organizations to create customized TLDs, like .church, .pizza, and .music.

true

11
New cards

PHP code has to start with the PHP opening tag. What does this look like?

<?php

12
New cards

What will be the result of executing this code?
$name = "Jesse";

A variable called $name will be created and assigned the value "Jesse"

13
New cards

When creating a variable in PHP, you have to declare the type of the data it's going to contain.

false

14
New cards

What will be the result of running this code?
$price = 1.99;
$currency = "GBP";
echo $price . $currency;

"1.99GBP" will be displayed

15
New cards

Where is PHP code executed?

On the server

16
New cards

What is the value of $colours[2] ?
$colours = [ "red", "green", "blue", "orange" ];

blue

17
New cards

How many elements can an array have in PHP?

As many as you like

18
New cards

Which is not correct syntax for creating an array?

$data = new array();

19
New cards

Which data type can not be used as an array index?

boolean

20
New cards

What is the index of the last element of this array, "Wednesday"?
$data = array(
"Monday",
3 => "Tuesday",
"Wednesday"
);

4

21
New cards

What is displayed when this code is executed?
if (false) {
echo "stop!";
} else {
echo "go!";
}

go!

22
New cards

What is the value of $message after running this code?
$size = 40;

if ($size <= 40) {
$message = "Forty or under";
} else {
$message = "More than forty";
}

forty or under

23
New cards

What is HTML used for?

To markup text to tell a browser how it's structured

24
New cards

What is displayed with the following markup?
<a href="https://www.wikipedia.org/">Wikipedia</a>

A link with the text Wikipedia

25
New cards

In the code below, assuming the $hour variable has been defined earlier on in the code, when is the else block executed?
if ($hour < 12) {
echo "Good morning";
} elseif ($hour < 18) {
echo "Good afternoon";
} elseif ($hour < 22) {
echo "Good evening";
} else {
echo "Good night";
}

Only if none of the conditions in the if statement and elseif statements match

26
New cards

What does the PHP closing tag look like?

?>

27
New cards

Which of the following will NOT display the value of the $message variable?

<?php $message ?>

28
New cards

Is this the correct format for a comment in HTML?
<!-- this is a comment -->

true

29
New cards

Whitespace in an HTML document (tabs, newlines, spaces etc.) affects how the document is displayed in the browser

False

30
New cards

True

31
New cards

Are these the four pieces of data that are required to connect to a database from a PHP script?
hostname, database name, username, password

true

32
New cards

Given this URL with this query string:
http://example.comshow.phppage=3&print=true&lang=en

What does the $_GET array in PHP contain

An array: [ "page" => 3, "print" => "true", "lang" => "en" ]

33
New cards

An SQL injection attack occurs when:

When you insert values directly into an SQL string without checking them first

34
New cards

.htaccess files allow you to configure the web server.

True

35
New cards

Which form method should be used for a search form?

GET

36
New cards

If you don't specify an action attribute on a form, the data is submitted to the same script where the form is

True

37
New cards

Which form method should be used for a login form?

POST

38
New cards

In MySQLi, which character is used as a placeholder in a prepared statement?

?

39
New cards

Which is the correct syntax for inserting multiple records at once in one statement?

INSERT INTO table_name (column1, column2) VALUES (value1, value2), (value3, value4), (value5, value6);

40
New cards

The alt attribute provides alternative text for those who are not able to see it. It is required for every img element in order for the HTML to be valid. It is used by screen readers, search engines, and graphical browsers when the image fails to load

true

41
New cards

Who was the creator of PHP

Rasmus Lerdorf

42
New cards

What are used for comments in PHP?

“#” or “//” or “/*”