Web Dev Foundations - D276 Flashcards

1
Q

Which pair of characteristics differentiate HTML from XML?

  • HTML is dynamic; XML is extensible.
  • HTML is static; XML has a limited number of tags.
  • HTML is static; XML is extensible.
  • HTML is dynamic; XML has a limited number of tags.
A
  • HTML is static; XML is extensible.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Which technique for implementing CSS in an HTML file is used for page-level style declarations?

  • External CSS
  • Style attribute
  • Link tag
  • Internal CSS
A
  • Internal CSS
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which CSS selector represents the first-child pseudo-class selector?

  • .first-child
  • # first-child
  • :first-child
  • ::first-child
A
  • :first-child
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Which CSS selector is used to style general sibling elements?

  • ~
  • .
  • *
  • +
A
  • ~

(~) selects all elements that are next siblings of a specified element.

(. ) selects classes

(* ) select all elements

(+ ) Adjacent sibling combinator

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are two unique characteristics that define a polygon hot spot?

Choose 2 answers.

  • Includes a radius coordinate
  • Specifies a center point
  • Gives diameter measurement
  • Begins and ends at the same pair of coordinates
  • Contains many pairs of coordinates
A
  • Begins and ends at the same pair of coordinates
  • Contains many pairs of coordinates

“A Polygon Hotspot lets you define a clickable area”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q
p { 
  padding: 5px 10px 15px; 
  height: 20px; 
  width: 60px; 
  border: 5px solid #000000; 
} 

What is the total width and total height of the paragraph element?

  • width = 90px and height = 50px
  • width = 80px and height = 40px
  • width = 85px and height = 45px
  • width = 75px and height = 55px
A
  • width = 90px and height = 50px

1 value - applies to all four sides.
2 values - first = top and bottom, second = left and right.
3 values - top, right and left, bottom.
4 values - top, right, bottom, and left in that order (clockwise).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Which feature helps the user find content throughout a website?

  • Image map
  • Glossary
  • Breadcrumbs’
  • Site map
A
  • Site map
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q
<!DOCTYPE html>
<html>
  <head>
    <title>Page Title</title>
    <style>
      p:first-child {
        color: orange;
      }
      p:last-child {
        color: blue;
      }
      p:nth-last-child(2) {
        color: green;
      }
    </style>
  </head>

  <body>
    <p>This is sentence one.</p>
    <p>This is sentence two.</p>
    <p>This is sentence three.</p>
    <p>This is sentence four.</p>
  </body>

What is the text color for the statement, “This is sentence two”?

  • Black
  • Blue
  • Green
  • Orange
A
  • Black

p:first-child targets sentence one

p:last-child targets sentence 4

p:nth-last-child(2) targets sentence 3

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q
<html>
<head>
  <style>
      html {
        font-size:16px;
      }
  </style>
</head>
<body>
  <p>By default all text has a font size of 16px.</p>
  <div>This sentence is double the size.</div>
</body>
</html>

Which unit of measurement sets the text size of the <div> element to be double that of the <html> element?

  • ch
  • ex
  • rem
  • vmin
A
  • rem
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Which set of CSS rules will create a fluid layout?

answer A:
body {
  margin: auto;
  border: solid 1px gray;
}
main {
  padding-left: 35%;
  border: solid 1px gray;
}
aside {
  width: 30%;
  float: left;
  border: solid 1px gray;
}
answer B:
body {
  width: 960px;
  margin: auto;
  border: solid 1px gray;
}
main {
  width: 670px;
  padding-left: 290px;
  border: solid 1px gray;
}
aside {
  width: 285px;
  float: left;
  border: solid 1px gray;
}
answer C:
body {
  width: 100%;
  margin: auto;
  border: solid 1px gray;
}
main {
  width: 670px;
  padding-left: 290px;
  border: solid 1px gray;
}
aside {
  width: 285px;
  float: left;
  border: solid 1px gray;
}
answer D:
body {
  width: 100%;
  margin: auto;
  border: solid 1px gray;
}
main {
  width: 70%;
  padding-left: 290px;
  border: solid 1px gray;
}
aside {
  width: 285px;
  float: left;
  border: solid 1px gray;
}
answer E:
body {
  width: 960px;
  margin: auto;
  border: solid 1px gray;
}
main {
  padding-left: 35%;
  border: solid 1px gray;
}
aside {
  width: 30%;
  float: left;
  border: solid 1px gray;
}
A
answer A:
body {
  margin: auto;
  border: solid 1px gray;
}
main {
  padding-left: 35%;
  border: solid 1px gray;
}
aside {
  width: 30%;
  float: left;
  border: solid 1px gray;
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

In what year did the Internet begin with four networked computers?

A

1969

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

In what year did the number of Internet users surpass 3 billion?

A

2015

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How many Domain Name System (DNS) servers currently exist in the world?

A

13

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the Third-level domain in the following multi-level domain name? cs.stanford.edu

A

cs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Regarding the parts of a URL, what is a Fragment?

  • Characters at the beginning of a URL followed by a colon (:) or a colon and double slashes (://).
  • Optional characters to the right of the question mark (?) in a URL that provide data for the web server.
  • The characters to the right of the hostname in a URL.
  • Optional characters at the end of a URL that start with a hash symbol (#) and refer to a certain location within a webpage.
  • The complete domain name following the scheme in a URL
A
  • Optional characters at the end of a URL that start with a hash symbol (#) and refer to a certain location within a webpage.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Identify all of the CONDITIONS below that could affect web accessibility.

  • American Disabilities Act (ADA)
  • Cognitive challenges like dyslexia and other difficulties in processing webpages
  • Hand control issues ranging from tremors to total inability to use hands
  • Seizures caused by flashing on the screen
  • Drag-and-Drop functionality
  • Visual problems like blindness, low vision, or color blindness
A
  • Cognitive challenges like dyslexia and other difficulties in processing webpages
  • Hand control issues ranging from tremors to total inability to use hands
  • Seizures caused by flashing on the screen
  • Visual problems like blindness, low vision, or color blindness
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

True or False? HTML comments should be used to ensure that the addition of random white space will not affect rendering in browsers.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Which of the following are examples of empty, or void, element tags? Select all that apply.

<br></br>

<hr></hr>

<img...>
<meta></meta>
<div>...</div>
<h1>...</h1>
</img...>

A

<br></br>

<hr></hr>

<img...>
<meta></meta>
</img...>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

How many heading element tags are there?

A

6

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Select the three optional table tags that browsers may use to allow scrolling of the table body independently from the table header and table footer.

  • <tbody>...</tbody>
  • <tfoot>...</tfoot>
  • <thead>...</thead>
  • <th>...</th>
A
  • <tbody>...</tbody>
  • <tfoot>...</tfoot>
  • <thead>...</thead>
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Select the three popular image formats supported by web browsers.

  • Document Object Model (DOM)
  • GIF (Graphics Interchange Format)
  • BMP
  • JPEG (Joint Photographic Experts Group)
  • PNG (Portable Network Graphics)
A
  • GIF (Graphics Interchange Format)
  • JPEG (Joint Photographic Experts Group)
  • PNG (Portable Network Graphics)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

True or false? Hyperlinks can only contain text.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

True or false? A absolute URL specifies the relative path to the web resource with no scheme or hostname

A

False

https://cart.com is an absolute URL

examples of relative URLs:

cart.com
../products/phones.html
#section-1.
?category=electronics

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

True or false? Hyperlinks can only contain text.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

True or false? An HTML entity always begins with an ampersand (&) and ends with a semi-colon (;).

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

What required <form> attribute specifies the manner in which the browser will send form data to a web server?

  • action
  • get
  • method
  • post
A
  • method
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

This required <form> attribute specifies the name and location of the CGI script used to process the form.

  • action
  • get
  • method
  • post
A
  • action

CGI stands for Common Gateway Interface and provides an interface between the HTTP server and programs generating web content. These programs are better known as CGI scripts.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

What <form> method attribute value instructs the browser to append the form data to the URL for use in a query string?

  • method
  • action
  • get
  • post
A
  • get
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

What <form> method attribute value allows sending more characters and is slightly more secure when submitting a Web-based form?

  • method
  • action
  • get
  • post
A
  • post
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

Select the containers from the following HTML elements.

  • <footer>...</footer>
  • <header>...</header>
  • <section>...</section>
  • <span>…</span>
  • <br></br>
  • <img></img>
A
  • <footer>...</footer>
  • <header>...</header>
  • <section>...</section>
  • <span>…</span>
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

Select the five (5) primary attributes for a <input></input> element.

  • id
  • name
  • placeholder
  • type
  • value
  • manifest
  • method
A
  • id
  • name
  • placeholder
  • type
  • value
32
Q

Which <input></input> attribute allows the input to start with a default value?

  • value
  • id
  • name
  • type
A
  • value
33
Q

True or false? A drop-down menu only allows one option to be selected.

A

True

34
Q

An <option>...</option> element must have a value attribute.

A

False

35
Q

True or false? Even though it may not be required, a web developer should always use the closing tag to mark the end of the tag content.

A

True

36
Q

True or false? The use of self-closing element tags should be avoided.

A

True

37
Q

True or false? It is good practice to use double quotes, which in general results in more readable HTML.

A

True

38
Q

True or false? A boolean attribute is false when present and true when absent.

A

False

39
Q

True or false? Developer guidelines suggest that you should always provide labels and/or placeholders for widgets.

A

True

40
Q

True or false? Good practice is to avoid using tables to manage tabular data and to avoid using CSS to manage page layout.

A

False

41
Q

Select the three (3) valid methods of implementing CSS for a web page.

  • embedded
  • external
  • inline
  • absolute link
  • anchor
A
  • embedded
  • external
  • inline
42
Q

Can XML tags be invented?

A

Yes

43
Q

XML simplifies the coding process regarding which of the following? Select all that apply.

  • Data Availability
  • Data Sharing
  • Data Transport
  • Platform Changes
A
  • Data Availability
  • Data Sharing
  • Data Transport
  • Platform Changes
44
Q

True or false? XML does not use predefined tags?

A

True

45
Q

What is the XML equivalent to the HTML Doctype declaration?

  • The XML prolog
    *The XML attribute
  • The XML entry
  • The XML root
A
  • The XML prolog
46
Q

Which of the following is the definition of a CSS declaration?

  • A CSS property followed by a colon (:) and the property value
  • One or more declarations separated by semicolons (;)
  • The HTML elements to which the specific style rule applies
A
  • A CSS property followed by a colon (:) and the property value
47
Q

Of the following, select the valid ways CSS can be implemented.

  • embedded
  • external
  • inline
  • absolute link
  • browser default
A
  • embedded
  • external
  • inline
48
Q

An inline style uses curly braces ({}).

A

False

49
Q

Of the following, select all valid pseudo-class selector examples.

  • :empty
  • :enabled
  • :hover
  • :lang(language)
  • .bold-red
  • alt
A
  • :empty
  • :enabled
  • :hover
  • :lang(language)
50
Q

The child selector, specified by using what symbol between two selectors, matches any elements where the second element is a direct child of the first element?

  • >
  • :
  • <
  • ~
A
  • >

div > p Selects all <p> elements where the parent is a <div> element

p ~ ul Selects every <ul> element that is preceded by a <p> element

51
Q

Which CSS selector, specified using a tilde character (~) between two selectors, matches the second element if the second element occurs after the first element and both elements are siblings?

  • general sibling
  • class
  • id
  • pseudo-class
A
  • general sibling
52
Q

Which CSS selector, specified by using a plus character (+) between two selectors, matches an element that immediately follows another element, where both elements have the same parent?

  • adjacent sibling
  • descendant
  • general sibling
  • pseudo-class
A
  • adjacent sibling
53
Q

Of the following, select all selectors known as combinators.

  • adjacent sibling
  • child
  • descendant
  • general sibling
  • class
  • pseudo-class
A
  • adjacent sibling
  • child
  • descendant
  • general sibling
54
Q

How is an attribute selector created in CSS?

*Specified with an attribute name and optional value comparison enclosed in square brackets ([ and ]).
* <link></link>Top</link>
*Characters at the beginning of a URL followed by a colon (:) or a colon and double slashes (://).
* When style declarations from a parent element cascade down and are applied to any child elements.

A

*Specified with an attribute name and optional value comparison enclosed in square brackets ([ and ]).

55
Q

Of the following, select the valid ways that we can specify color.

  • Hexadecimal color
  • HSL color value
  • RGB color value
  • RGBA color value
  • <link...>
    </link...>
  • browser default
A
  • Hexadecimal color
  • HSL color value
  • RGB color value
  • RGBA color value
56
Q

An absolute size is a size that is fixed and independent of other CSS sizes. Of the following, select all absolute size units.

  • cm - centimeters
  • in - inches
  • mm - millimeters
  • pc - pica
  • pt - points
  • px - pixels
A
57
Q

The box model references which of the following components of all HTML elements?

  • border
  • content
  • margin
  • padding
  • action
A
  • border
  • content
  • margin
  • padding
58
Q

What is an element that has the CSS property display set to grid to create a block-level container or inline-grid to create an inline container?

  • grid container
  • grid item
  • grid layout
  • grid-template-columns
A
  • grid container
59
Q

Which CSS position property value positions an element relative to the nearest positioned ancestor?

  • absolute
  • fixed
  • relative
  • static
A
  • absolute
60
Q

True or false? Multiple shadows can apply to the same text.

A

True

61
Q

Select all applicable properties to be used with the box-shadow CSS property.

  • blur-radius
  • color
  • inset
  • offset-x
  • offset-y
  • spread-radius
  • box model
A
  • blur-radius
  • color
  • inset
  • offset-x
  • offset-y
  • spread-radius
62
Q

To create a CSS animation, which two (2) CSS properties must be defined?

*animation-duration
* animation-name
* action
* anchor

A

*animation-duration
* animation-name

63
Q

True or false? If animation-duration is assigned the value 0s, the animation occurs very quickly.

A

False

64
Q

Which CSS property controls the speed of an animation between keyframes?

  • animation-timing-function
  • animation-delay
  • animation-duration
  • animation-function
A
  • animation-timing-function
65
Q

Which CSS property indicates the number of times a CSS animation will run?

  • animation-iteration-count
  • animation-direction
  • animation-duration
  • animation-timing-function
A
  • animation-iteration-count
66
Q

Which function moves an element 20 pixels to the left and 5 pixels down?

  • translate(-20px,5px)
  • translate(-20,5)
  • translate(100%,5em)
  • translate(20px,-5px)
A
  • translate(-20px,5px)
67
Q

True or false? Links are generally larger on mobile websites.

A

True

68
Q

Which of the following is a characteristic of a browser, device, or environment? (ex: aspect-ratio, height, and orientation)

  • media type
  • media feature
A
  • media feature
69
Q

What is the easiest method for opening the Chrome devtools?

  • pressing the f12 key on your keyboard while using Chrome
  • by concentrating intently on the Google logo within the Chrome browser
  • by pressing the Open DevTools key on your keyboard while using Chrome
  • by right-clicking on an empty space within a webpage being displayed in Chrome
A
  • pressing the f12 key on your keyboard while using Chrome
70
Q

What is a root folder for a website?

  • the parent folder of the folder where the CSS files are saved for a webpage
  • the root folder on the web server
  • the folder where the website files are stored
  • the subfolder of the web server root folder
A
  • the folder where the website files are stored
71
Q

Which two statements accurately describe the differences between HTML and XML?

  • HTML is a display language, while XML is a data storage language.
  • HTML and XML are identical. No differences.
  • HTML files and XML files have different file extensions (.html and .xml).
  • HTML is case sensitive, while XML is not case sensitive.
A
  • HTML files and XML files have different file extensions (.html and .xml).
  • HTML is a display language, while XML is a data storage language.
72
Q

Which state describes the relationship between Dynamic HTML (DHTML) and the Document Object Model (DOM)?

  • DHTML defines the style of a web page, and the DOM provides interactivity and animation features.
  • The DOM and DHTML are two distinct languages for both establishing the structure and modifying the look and feel of a web page.
  • The DOM is a standard way to define style configurations for DHTML.
  • HTML utilizes a collection of technologies, including the DOM, to control the overall appearance and function of a webpage.
A
  • HTML utilizes a collection of technologies, including the DOM, to control the overall appearance and function of a webpage.
73
Q

What is the difference between AJAX and DHTML?

  • DHTML and AJAX perform the same function in browsers.
  • DHTML supports content display from remote resources, AJAX supports its display in a browser.
  • DHTML is for interaction and AJAX is for data storage.
  • DHTML is used for animation and AJAX is for media display.
A
  • DHTML supports content display from remote resources, AJAX supports its display in a browser.
74
Q

What is one of the most important aspects of designing web pages for mobile devices?

  • Making navigation touchscreen compatible
  • Reducing the number of colors used in images
  • Tailoring content to individual mobile device platforms
  • Prioritizing content
A
  • Prioritizing content
75
Q

Which laws enforce rules and regulations over web page content globally?

  • The US Copyright law regarding ownership
  • The American Disability Act, Section 508 guidelines
  • The standards created by the World Wide Consortium
  • The United Nations regulations on information display
A
  • The US Copyright law regarding ownership
76
Q

Which phase of the web page life cycle is concerned with deprecated hyperlinks?

  • Design and Development
  • Purpose and Requirements Analysis
  • Deployment and Maintenance
  • Testing and Implementation
A
  • Deployment and Maintenance
77
Q

Which language is not used to connect with a server-side programming language for web development?

  • CGI
  • HTML
  • JavaScript
  • PHP
A
  • HTML