cs006 test 2

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

As presented in class, the definition of privacy provides for all but which of the following?

The right to freely choose what to share.

It is allowable to include HTML code in a CSS (.css) file. The HTML code will not cause a syntax error.

false

As presented in lecture, what generally motivates people to choose to share personal information online.

nothing to hide, nothing to fear principle...to create a public persona

Of the four categories of private data use: no uses, opt-in, opt-out, and no limits...which two grant the least amount of protection for the user by default (requires no action taken by user).

opt-out, no limits

A list of declarations combined with a selector and curly braces ('{' and '}') is called a what?

style rule

Style rule model [internal/embedded]

- selector: { declaration; } -selector: { property: value; } -selector: {declaration block; } -selector: { property1: value1; property2: value2; property3: value3; }

A browser fingerprint can reveal all but which information about a user's device.

A user's actual IP address if they are using a VPN.

Which statement below correctly uses the style rule with class selector below?

<div class="topnav">...<div>

Which of the following color codes is not red or a shade of red?

All color codes are red or a shade of red.

ex: * { box-sizing: border-box; }

-'*' is a special selector called the universal selector. This selector will apply its rule to all elements. -The asterisk serves as a wildcard selector in this sense. -"box-sizing: border-box;" declaration specifies to include padding and border in the element's total width and height calculation.

<link rel="stylesheet" type="text/css" href="lab3-style.css">

-<link> element defines a reference to an external resource -rel attribute specifies the relationship between the .html file and the linked resource -type attribute denotes the linked resource (file) as an external style sheet -the href attribute specifies the name and location of the file to access.

class attribute

-The HTML class attribute is used to specify a class for an HTML element. -The class attribute is often used to point to a class name in a style sheet. It can also be used by a JavaScript to access and manipulate elements with the specific class name.

Cascading Style Sheets

-a stylesheet language -is neither a programming language like Python, Java, or C++, nor a markup language like HTML -is a language in that it has a syntax and the different components of the language have meaning -describes how HTML elements should be rendered in a web browser's window -be used with XML-based languages like SVG or MathML.

Inline CSS styles

-are added in the <body>...</body> of the web page as an attribute of individual HTML elements -The style applies only to the specific element that contains it as an attribute -ex: <p style="text-shadow: 0px 1px 1px #3d3d3d;"> -can only affect a single instance of an element

Style rules

-basic methods by which CSS is applied -specifies how an element or group of elements will be displayed in a web browser -Each rule has a selector and a declaration -selector defines which element will be styled or appear by a declaration or sequence of declarations (declaration block)

cascading order sequence

-browser settings -css sheet -embedded -inline

border-radius

-defines the radius of the element's corner -Four values border-radius: 15px 50px 30px 5px; (first value applies to top-left corner, second value applies to top-right corner, third value applies to bottom-right corner, and fourth value applies to bottom-left corner) -Three values -border-radius: 15px 50px 30px; (first value applies to top-left corner, second value applies to top-right and bottom-left corners, and third value applies to bottom-right corner) -Two values - border-radius: 15px 50px; (first value applies to top-left and bottom-right corners, and the second value applies to top-right and bottom-left corners) -One value border-radius: 15px; (the value applies to all four corners, which are rounded equally

text-shadow property

-ex: "text-shadow: 2px 2px 3px #696969;" -first two values (2px and 2px) specify the length of the shadow offset -The first value (2px) specifies the horizontal distance, or distance in pixels in the X-direction that the shadow will appear. A positive X-value indicates the shadow is off to the right of the original text. -The second value (2px) specifies the vertical distance, or distance in pixels of the shadow in the Y-direction. A positive Y-value indicates the shadow is below the original text. -The third value (3px) specifies the blur radius

pseudo classes

-ex: :link(unvisitedlink) :visited(visitedlink), :hover(mousehover) and :active(selectedhover) -They allow for styles to be applied based on an HTML element's state

internal (aka embedded) CSS

-including the style rules inside of a <style></style> element in the head section of an html file -go inside of <head>...</head>. -Then all elements in the body section of the HTML files that do not have an Inline CSS style rule will be displayed according to the style rules in-style element. -Elements that do not have a CSS style rule will default to browser settings

style rule with the selector ".topnav a"

-is a "descendant selector" combinator -The class name with leading '.'and the space after and the element name 'a' constitute a single selector

padding

-padding-top -padding-right -padding-bottom -padding-left -ex: div {padding-top: 50px; padding-right: 30px; padding-bottom: 50px; padding-left: 80px; }

declaration: "text-align:___"

-position -ex: "center;"

css border

-properties allow you to specify the style, width, and color of an element's border -The border-style property specifies what kind of border to display. The following values are allowed: dotted - Defines a dotted border dashed - Defines a dashed border solid - Defines a solid border double - Defines a double border groove - Defines a 3D grooved border. The effect depends on the border-color value ridge - Defines a 3D ridged border. The effect depends on the border-color value inset - Defines a 3D inset border. The effect depends on the border-color value outset - Defines a 3D outset border. The effect depends on the border-color value none - Defines no border hidden - Defines a hidden border The border-style property can have from one to four values (for the top border, right border, bottom border, and the left border).

rgba color code

-rgba(r,g,b,alpha) -ex: rgba(79, 156, 255, 0.75) -The first three arguments, 79, 156, and 255 represent the number of units out of 255 total possible for the amount of the colors Red, Green, and Blue respectively for a pixel. -0.75 represents the percentage that a pixel's overall color combination is transparent versus opaque -A value of 0.0 would render completely transparent, appearing to have no noticeable color. A value of 1.0 would render total opaqueness. A value of 0.5 would be equal amounts of transparency versus opaqueness.

border-top

-shorthand property sets all the top border properties in one declaration. -The properties that can be set must be in the following order: -border-top-width -border-top-style (required) -border-top-color -If border-top-color is omitted, the color applied will be the color of the text.

To obtain a color's rgb percentages:

-take each individual component and divide by 255 -ex: rgb(145,208,96) -->Red component: 145/255 = 0.568627451 -->Green component: 208/255 = 0.815686275 -->Blue component: 96/255 = 0.376470588

Both the General Data Protection Regulation (GDPR, European Union) and the California Consumer Privacy Act (CCPA) grant the user the right to know what data is being collected on them by companies.

-true

".class" selector

-used to select elements with a specific "class" attribute -Class names are user-defined by the web developer -This was the way regions of a webpage were stylized before the introduction of HTML semantic elements, e.g., <header>, <nav>, and <footer>

CSS class selector:

-when we want to apply a CSS declaration to a group of elements on a web page and not necessarily tie the style to a particular HTML element, a CSS class selector can be used. -When setting a style for a class, configure the class name as the selector. Place a dot, or period (.), in front of the class name in the style sheet.

What are the percentages of the colors red, green, and blue in rgb(64, 128, 255)? Choose the most correct answer.

25.% Red 50.2% Green 100% Blue

For the color rgba(128,128, 0, 0.4), what percent transparent is the color?

60%

Where in the source code for a web page can the following blocks of code be used?

In a .css file. In the style element In the head section of an HTML file All of the above!!!

Which if the following personal use categories provides the most protection for the consumer by default? Meaning the consumer must not take any action.

No Uses

Which statement below is not true?

Privacy is an enumerated right in the Bill of Rights (First 10 Amendments to the US Constitution).

Which of the following is not provided by a VPN (Virtual Private Network) client?

The encrypted connection helps ensure that sensitive data is safely transmitted.

Which of the CSS rules below uses a pseudo class?

a:link { color: orange; }

If an h2 element were added to the body section of the HTML code in Figure 4, what color would the text be?

black

What declaration below, that uses border-radius, was used to draw the following 200px by 200px block style HTML element?

border-radius: 0px 80px;

If the following CSS rule resides in an external style sheet my-rules.css and is linked to an html file. Which CSS style level cannot override the external style rule from within that html file.

browser default style

What CSS code should be added to the p rule (gray box) inside p {...} to display the web content below?

color: #FF0000; background-color: #FFFFFF;

Duotone color filtering

combines two colors to represent an image

For internal (embedded) CSS, style is used as a what?

element

Which of the following is strictly a CSS declaration?

font-family: verdana;

Which of the following cannot be a selector?

font-style

If the following inline style was added to h1, what color would the text be? <h1 style="color:red;">All Along the Watch Tower</h1>

red

declaration: "background-color:___"

sets the background-color to a shade

declaration: "color:___"

sets the color (foreground color) to a shade

Which declaration below, that uses text-shadow, is applied to the following <h1>Look To The Future</h1>?

text-shadow: -10px 10px 3px #FF0000;


Set pelajaran terkait

Chapter 21 Equipping the Kitchen Vocab

View Set

Gallbladder and Biliary Ducts Final Exam Review

View Set

Ancient Egypt Geography, Hieroglyphics, Social Hierarchy, Kingdoms, Pharaohs,Valley of the Kings, Society Roles and Mummification

View Set

Mental Health Exam Unit 5- Final

View Set

CSE 1321 Midterm (Modules 1-4)_SHARED.Version_

View Set

HIS 141 - Age of Exploration Reformations

View Set