Programming for Cyber security - Chapter 1 HTML Basics

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

Browsers recognize five ____ font groups.

generic

In a two-sided tag, a(n) ____ tag indicates the content's end.

closing

A structural element that has content containing tangential or side issues to the main topic of the page is a(n) ______.

<aside>

Which SQL statement is used to delete data from a database?

Delete

Python can be used to write Java Scripts when there is no Java compliler available.

False

Style sheets cannot be as long and complicated as HTML files.

false

The figure above shows an ordered list ( the J-Prop Shop web page)

false

The subscript and superscript styles lower or raise text vertically, as well as resize it.

false

In every version of CSS, you apply a style rule containing a list of style properties to anelement or a group of elements known as a selector.

True

Hyperlinks are created by enclosing some document content with a set of opening and closing <a> tags.

true

In Python, 'Hello', is the same as "Hello"

true

The doctype is used by ______, which are programs that examine document code to ensure that it meets all the syntax requirements of the specified language.

validators

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

Web browsers communicate with Web servers using the ____ communication protocol.

HTML)

If an element contains 12pt text, a length of 2em equals ____.

24 pts

If a network covers several buildings or cities, it is called a ____.

WAN

A structure to make it easier for users to return immediately to the home page or other main pages is called a(n) ____.

augmented linear structure

Which operator is used to select values within a range?

between

A typeface that mimics handwriting with highly stylized elements and flourishes,best used in small doses for decorative page elements, is ______.

cursive

What is the correct way to create a function in Python?

def myFunction()

If the path and filename are left off the URL, the server returns the ____.

default home page

With SQL, how can you delete the records where the "FirstName" is "Peter" in the Persons Table?

delete from persons where firstname = 'peter'

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

Another type of list that contains a list of terms, each followed by its description, is called a(n) ________.

description list

Many Web browsers now include _______ tools to allow page designers totrack each style back to its source.

developer

Different Web site design principles apply to the protected section than to the regular, open section of the site.

false

The base element is useful when multiple documents are moved to a new folder.

false

___ servers can store files that Internet users can download, or transfer, to their computers.

ftp

CSS allows RGB values to be entered as ____.

hexadecimals

From the ____, you add links to other pages in the site, defining the site's overall structure.

home page

To create a link to an anchor, you use the ____ attribute.

href

The @import rule has the same impact as adding multiple ____ elements to theHTML file.

link

The links.htm file is in the same folder as the chem.html file. What is the relative pathname for the links.htm file?

links.htm

_____ defines how much of the colors below the surface of the current object show through to affect its appearance.

opacity

The default unit of length for kerning and tracking is the ____.

pixel

The second version of CSS, CSS2, was introduced in 1998, expanding the language to provide styles to _________.

position elements at specific locations on a page

A(n) ____ is a set of rules that governs how information is exchanged.

protocol

As with absolute pathnames, folder names are separated by ____ in relative pathnames.

slashes

An additional factor in applying a style sheet is that properties are passed from a parentelement to its children in a process known as __________.

style inheritence

Style comments can also be added to embedded style sheets as long as they are placed between the opening and closing<style> ______.

tags

The accompanying figure shows an example of a(n) ____ applied to a link.

tooltip

A generic font describes the general appearance of a typeface, but does not rely on a specific font definition.

true

A network that covers a wider area, such as several buildings or cities, is called a wide area network or WAN.

true

By default, browsers offset ordered and unordered lists from the surrounding text.

true

CSS also allows RGB values to be entered as hexadecimal numbers.

true

Every Web site should include a navigation list, which is a list containing links to the main topic areas of the site.

true

Good management skills are as crucial to good Web design as a well-chosen color or typeface.

true

Ordered lists are used for items that follow some defined sequential order.

true

The NOT NULL constraint enforces a column to not accept NULL values.

true

The structure shown in the accompanying figure is a linear structure.

true

To render a document, the device displaying the page needs a style sheet that specifies the appearance of each page element.

true

Unstructured Web sites can be difficult and frustrating to use.

true

How do you create a variable with the floating number 2.8? x = float(2.8)x = 2.8Both the other answers are correct Next ❯

x=float(2.8) and x=2.8 (not all of them)

Which of these collections defines a DICTIONARY?

{"name":"apple","color":"green"}

You link to an id or anchor using the anchor name preceded by the ____ symbol.

#

In the URL http://www.mwu.edu/course/info.html#majors, the id/anchor name is ____.

#majors

Yellow has the triplet ____.

(255,255,0)

Which of the following relative pathnames is interpreted as "the parks.htm file is in the extra subfolder, which is one level down from the current folder"?

../extra/parks.htm, /extra/parks.htm)

Which of the following relative pathnames is interpreted as "the chem.htm file is in the tutorial subfolder one level up in the folder tree from the current file"?

../tutorial/chem.htm

Which of the following relative pathnames is interpreted as "the rock.htm file is in the same folder as the current file"?

./rock.htm)

Which of the following absolute pathnames is interpreted as "the chem.htm file is in the tutorial folder, which is a subfolder of the tutorial02 folder"?

/tutorial02/tutorial/chem.htm

Graphic designers consider ____ easier to use because it allows you to guess at aninitial color based on hue and then tweak the saturation and lightness values to fine-tunethe final color.

HTMl)

To create a hypertext link to a document on the Internet, you need to know its ____.

URL

What is a correct syntax to return the first character in a string? x = "Hello".sub(0, 1)x = "Hello"[0]x = sub("Hello", 0, 1) Next ❯

X="hello"[0]

Which of the following absolute pathnames is interpreted as "the rock.htm file is in the case1 folder, which is a subfolder of the tutorial02 folder"?

\tutorial02\case1\rock.htm)

In addition to content, elements also support _______ that specify the use, the behavior, and in some cases the appearance of an element.

attributes

CSS supports styles to define both the text and ______ color for each element on your page.

background

A relative path specifies a file's precise location within the entire folder structure of a computer.

false

Another type of style sheet created by a Web page author is an embedded style sheet,in which the styles are inserted directly within the body element of an HTML document.

false

Each document on the World Wide Web is referred to as a Web page and is stored on a file server.

false

Linear structures work for Web sites that are large and have a clearly defined order of pages. Question 6 options:

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.

false

Since an HTML file is a text file, it is composed of text characters and blank space.

false

The body element is where you provide browsers with information about the document.

false

The structure shown in the accompanying figure is a hierarchical structure.

false

The structure shown in the accompanying figure is an augmented linear structure.

false

With SQL, how can you insert "Olsen" as the "LastName" in the "Persons" table?

insert into persons (lastname) values ('olsen')

The most often-used program language for the Web is ________

java script

The amount of space between pairs of letters is referred to as the ____.

kerning

If computers are close together, the network linking them is called a ____.

lan

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

____ is the space between lines of text.

leading

______ measures the brightness of the color and ranges from 0% (black) up to100% (white).

lightness

Which operator is used to search for a specified pattern in a column?

like

A(n) ____ links each page with the pages that follow and precede it.

linear structure

A typeface in which each character has the same width and is often used to display programming code is ______

monospace

Every Web site includes a list containing links to main topic areas of the site called a(n) ____.

navigation list

A technique known as ______ enhancement places code conforming to olderstandards before newer properties.

progressive

Color also evokes an emotional response, in which certain colors are associated withparticular feelings or concepts, such as the color ____ for assertive, powerful, sexy, and dangerous.

red

A(n) ____ path specifies the location for a file in relation to the folder containing the current Web document.

relative

Most Web designers use ____ pathnames in their hypertext links.

relative

____ units express font size relative to the size of other objects within the Web page.

relative

A general rule for printing is to use ______ fonts for headlines and serif fonts forbody text.

sans-serif

______ measures the intensity of the chosen color and ranges from 0% (no color) up to 100% (full color).

saturation

One of the great advantages of relative units like the em unit is that they can makeyour page ______, allowing the page to be rendered the same way no matter what fontsize is used by the browser.

scalable

With SQL, how do you select all the columns from a table named "Persons"?

select * from persons

With SQL, how can you return all the records from a table named "Persons" sorted descending by "FirstName"?

select * from persons order by 'firstname' desc

With SQL, how do you select all the records from a table named "Persons" where the value of the column "FirstName" is "Peter"?

select * from persons where firstname='peter'

With SQL, how do you select all the records from a table named "Persons" where the "FirstName" is "Peter" and the "LastName" is "Jackson"?

select * from persons where firstname='peter' and lastname='jackson'

With SQL, how do you select all the records from a table named "Persons" where the value of the column "FirstName" starts with an "a"?

select * from persons where firtname like 'a%'

With SQL, how can you return the number of records in the "Persons" table?

select count (*) from persons

Which SQL statement is used to return only different values?

select distinct

With SQL, how do you select a column named "FirstName" from a table named "Persons"?

select firstname from persons

To prevent your browser from displaying address text in italic, you can set the font-style property to _____.

semi-italic)

A typeface in which a small ornamentation appears at the tail end of eachcharacter is _____.

serif

Two child elements that share the same parent are referred to as ______ elements.

sibiling

A page containing an outline of the entire site and its content, called a(n) ____, can be supplied to users.

site index

In an absolute pathname, after you type the name of the folder that contains the file, you type a final ____ and then the filename itself.

slash

With HTML, absolute pathnames begin with a ____.

slash

Following the communication protocol, there is typically a separator, such as a colon and two ____.

slashes

One reason to use the class attribute is to assign the same _____ to multiple elementsthat belong to the same class.

style

The _____ value of the vertical-align style aligns the bottom of the element with the bottom of the font of the surrounding content.

text-bottom

Absolute measurements are appropriate when you know the physical properties ofan output device and want to fix a size to a specific value.

true

In the structure shown in the accompanying figure, you can jump only from one page to the next or previous page.

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.

true

The OR operator displays a record if ANY conditions listed are true. The AND operator displays a record if ALL of the conditions listed are true

true

The first style sheet interpreted by the browser is the one built in to the browser itself.

true

The home page acts as a focal point for the Web site.

true

When you specify only the filename, the browser assumes the file is in the same folder as the document containing the hypertext link.

true

You can combine linear and hierarchical structures in a Web site.

true

In the hexadecimal system, 21 is expressed as ____.

15

In the URL http://www.mwu.edu/course/info.html#majors, the protocol is ____.

http

You assign each anchor its own anchor name, using the ____ attribute.

name

To link to a document, you must specify its ____.

path

With SQL, how do you select all the records from a table named "Persons" where the "LastName" is alphabetically between (and including) "Hansen" and "Pettersen"?

select * from persons where lastname between 'hansen' and 'pettersen'

Closing tags are identified by the ____ that precedes the tag name.

slash

A ____ specifies a precise location on the Web for a file.

url

Style sheets are written in the Cascading Style Sheet (CSS) language.

true

Which of the following relative pathnames is interpreted as "the index.htm file is in the folder one level up in the folder tree from the current file"?

../index.htm

CSS supports the ___ basic color name

16

The ______ statement must always come before any other style rules in the stylesheet.

!import)

How do you insert COMMENTS in Python code?

#This is a comment

A file named "chem.htm" in the tutorial02 folder on drive C of your computer has what absolute pathname?

/C|tutorial02/chem.htm

In the URL http://www.mwu.edu/course/info.html#majors, the path and filename of the document are ____.

/course/info.html

Which of the following absolute pathnames is interpreted as "the parks.htm file is in the extra folder, which is a subfolder of the /tutorial02/case1 folder"?

/tutorial02/case1/extra/parks.htm

In the preceding figure, the item number _____ displays the shortcut property. Question 8 options:1234

4)

The general syntax to create a hypertext link is ____.

<a href="contact.htm">Contact Me</a>

Once you know an element's id, you can create a link to it by adding the id to the ____ tag along with the href attribute in your text file.

<a>

Which operator can be used to compare two values?

==

Styles set by the author of a Web page and stored in an internal style sheet are loadedafter internal and user-defined style sheets.

False

Web page authors can take advantage of the structural elements provided by ____.

HTML 5

When you want the home page to link to pages dedicated to specific topics, you should use the ____.

Hierarchical structure

What is the most common type of join?

INNER JOIN

List style types can be used with contextual selectors to create an outline style basedon nested lists.

True

If you want an external document to be displayed in its own browser window, you can assign the ____ keyword to the target attribute.

_blank

A(n) ____ path provides a precise location for a file.

absolute

____ units define a font size using one of five standard units of measurement.

absolute

Which of the following is an HTML-supported kind of path?

absolute, relative

Which of the follow is a program leader in Web publishing software?

adobe dreamweaver

The color scheme that uses two hues close to one another on the color wheel in which one color is thedominant color and the other is a supporting color used only for highlights and nuance is _____.

analogic

To specify a hotspot in an image map, you can use the ____ shape.

circle,poly,rect

To set the foreground or text color of an element, use the following property:

color:color

Which SQL statement is used to create a table in a database?

create table

One commonly used relative unit is the ____ unit.

em

Unlike an external style sheet, a(n) _______ style sheet is applied only to the Webpage in which it is placed.

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.

embedded)

A color value is an alphabetic expression that describes the properties of a color.

false

Web pages are unstructured documents in which elements are nested within other elements,forming a hierarchy of elements.

false

You can quickly change an XMTML document into an HTML document just by altering the first three line of code.

false

A host that provides storage space for saving and retrieving files is called a _______.

file server

How do you start writing a for loop in Python?

for x in y:

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.

graphic)

Extending the first line of text to the left of the text block creates a ____ indent.

hanging

All Web page URLs begin with the letters ____.

http

____ is the tint of the color and is based on the color's location on the colorwheel.

hue

Two attributes, ______, are often key in targeting styles to a specificelement or group of elements.

id and class

Which SQL statement is used to insert new data in a database?

insert into

With SQL, how can you insert a new record into the "Persons" table?

insert into persons ('jimmy',jackson') into persons

Which SQL keyword is used to sort the result-set?

order by

A _____ element is an element that contains one or more other elements, which are child elements.

parent

With semi-transparent colors, the final color rendered by a browser depends on thebackground color of the ______element.

parent

Sections of most commercial Web sites are off-limits except to subscribers and registered customers and have a(n) ____ Web page that users must go through to get to the off-limits area.

password-protected

When referencing a file located in a different folder than the link tag, you must include the ____ for the file.

path

To reference a file in a folder directly above the current folder in the folder hierarchy, relative pathnames use two ____.

periods

A(n) ____ represents a single dot on the output device.

pixel

If you use a hexadecimal value for a color, you preface the hexadecimal string with a(n) ____.

pound symbol

The first portion of a URL identifies the ____

protocol

The size or _______of most output devices is typically expressed in terms of pixels.

resolution

You should almost always use relative paths in your links.

true

The Web font format that supports Internet Explorer is _______.

true type/open type)

If an element contains text or another element, it is marked using a ______tag set in which an opening tag and a closing tag enclose the element content.

two-sided

Which SQL statement is used to update data in a database?

update

How can you change "Hansen" into "Nilsen" in the "LastName" column in the Persons table?

update persons set lastname='Nilsen' where lastname-'hansen'

To differentiate the absolute pathnames to files that are located on different drives, HTML requires you to include the drive letter followed by a ____.

vertical bar

The style rule* {color: blue;}uses the asterisk (*) selector—also known as the ______ selector—to select all elementsin the document.

wildcard

In the URL http://www.mwu.edu/course/info.html#majors, the server is ____.

www.mwu.edu

How do you create a variable with the numeric value 5?

x=5, x=int(5)

Which of these collections defines a SET?

{"apple","banana","cherry"}

A style sheet file has the file extension _____, which distinguishes it from an HTML file.

.css

To add the comment, Welcome John Smith, the syntax would be

<!--welcome john smith-->

To add the comment, Welcome John Smith, the syntax would be ________

<"Welcome John Smith-->

_____ is a generic grouping element.

<div>

Most Web browsers use a fill-in _____ for unordered lists.

circle

_________ do not contain content, but often are employed to send directives to browsers regarding how a page should be rendered.

empty element

Web pages are text files written in a language called ____.

html

Which one is NOT a legal variable name?

my-var

The structure of ordered and unordered lists is the same, except that the list items for an ordered list are nested within the ___ element.

ol)

The document ______ is not displayed within the page, but is usually display in a browser's title bar or on a browser tab.

title

Heading elements contain the text of main headings on a Web page.

true

The founders of the Web developed a system of ____ documents.

hypertext

How do you start writing an if statement in Python?

if x > y:

Which collection is ordered, changeable, and allows duplicate members?

list

A ____ language is a language used to describe the content and structure of documents.

markup

A Web ____ makes a page available to users of the Web.

server

Which collection does not allow duplicate members?

set

Which of these collections defines a TUPLE?

("apple","banana","cherry")

XHTML version ____ is an update to HTML 4.01 that provides support for a variety of new features including semanitic page elements, column layout, form validation, offiline storage, and enhanced multimedia. Question 2 options:

(1.0)

Which operator is used to multiply numbers?

*

XHTML version ____ is a reformulation of HTML 4.01 in the XML language in order to provide enforceable standards for HTML content and to allow HTML to interact with other XML languages.

1.0

Which of these collections defines a LIST?

["apple","banana","cherry"]

You can mark extended quotes with the HTML _________ element.

blockquote

A text-level element does not start out on a new line but flows below the rest of the characters in grouping element.

false

An HTML document is composed of tags that represent distinct items in the Web page, such as a paragraph, the page heading, or even the entire body of the page itself.

false

Each browser has its own external style sheet that specifies the appearance of different HTML elements.

false

Inline images are considered text-level elements and thus must be placed within a grouping element such as a body or a paragraph.

false

The top level of a nested list contains minor items, with each sublevel containing items of greater importance.

false

The first elements you add are ______ elements, which are elements that contain content that is viewed as a distinct block within the Web page.

grouping

A(n) __ heading acts as a subtitle by grouping it with a main title heading using the hgroup element.

h1 and h2

The __________ contains general information about the document such as the document title, or a list of keywords that would aid search engines in directing interested users to the page.

head element

Each browser has its own ______ style sheet that specifies the appearance of different HTML elements.

internal

A two-sided tag contains a(n) ____ tag that tells the browser to turn on a feature and apply it to the content that follows.

opening

A(n) ____ list is used to display information in sequential order.

ordered

What is a correct syntax to output "Hello World" in Python?

print("Hello World")

What is the correct syntax to output the type of a variable or object in Python?

print(typeOf(x))(not) possibly print(type(x))

Which statement is used to stop a loop?

break

A Web ____ is a software program that retrieves the page and displays it.

browser

Which method can be used to remove any whitespace from both the beginning and the end of a string?

strip()

To designate a paragraph element you would use the ____ tag.

<p>

The exact appearance of the hr element is left to the browser.

true

What is the correct file extension for Python files?

.py

HTML version ____ added interactive elements, including Web forms.

2.0

HTML version ____ added support for style sheets to give Web designers greater control over page layout and appearance.

4.01

To add notes or comments, insert a comment tag using the syntax ______

<!--comment-->

A Web page ____ can also create a style sheet that takes precedence over the internal style sheets of browsers.

author

Elements support attributes that specify the use, the behavior, and in some cases the appearance of an element.

true

The most often-used program language for the Web is JavaScript.

true

The rules that govern how code should be entered are called syntax.

true

Web pages are text files written in Hypertext Markup Language (HTML).

true

XML is a compact offshoot of SGML and is used to define new markup languages, known as XML vocabularies.

true

Which method can be used to return a string in upper case letters?

upper()

How do you start writing a while loop in Python?

while x>y:

The largest WAN in existence is the ____.

world wide web

An HTML document is composed of ______ that represent distinct items in the Web Page, such as a paragraph, the page heading, or even the entire body of the page itself.

elements

The technique of placing one element within another is called ____.

nesting

Documents on the Web are known as Web ____.

pages

Which method can be used to replace parts of a string?

replace()

Which SQL statement is used to extract data from a database? SELECTEXTRACTOPENGET Next ❯

select

The World Wide Web Consortium has created a set of ____, or specifications, that all browser manufacturers follow.

starndards

What does SQL stand for?

structured query language

The exact appearance of each page is described in a separate document known as a ______

style sheet

One reason for the success of the Web is that HTML has made it easy for non-programmers to write and edit code without being ensnarled by ______ violations.

syntax

____ browsers were incapable of displaying images.

text based


Ensembles d'études connexes

MA Real Estate Practice Exam Questions

View Set

Social Responsibilities and Ethics - Ch 11

View Set

200 hour Yoga Teacher Training Final

View Set

BANA 2372 - Chapter 4 - Midterm Exam 1 - Practice

View Set

Slopes of Parallel and Perpendicular Lines

View Set

FINAL Mod 6 - Stroke (PRACTICE QUESTIONS)

View Set

Chapter 10: the Economics of Banking

View Set