Michael Agnew Test 2 Review Guide Javascript and CSS

0.0(0)
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/63

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.

64 Terms

1
New cards

Inline style

Places CSS declaration inside an element’s style attribute.

2
New cards

Embedded stylesheet

Places CSS rules in an HTML document’s head using a <style> element. 

3
New cards

External stylesheet

Places CSS rules in a separate file that is imported into an HTML document with a <link> element. 

4
New cards

Inline Stylesheet

styles are defined directly within an HTML tag using the style attribute. 

5
New cards

Embedded stylesheet

Called upon in HTML file in between <script> tags

6
New cards

External stylesheet

stored in a separate .css file, which is linked to the HTML file using the <link> element in the <head> section. 

7
New cards

Cascade

conflicting styles are resolved based on their order and importance. 

8
New cards

Specificity

CSS rule is applied by assigning a selector type (element, class, ID, inline). 

9
New cards

Inheritance

the process by which certain properties are passed down from parent elements to child elements. 

10
New cards

Write CSS to change the font color of all <h1> elements to purple.

h1 { color: purple; }

11
New cards

Write CSS to change the background color of all elements with the class .highlight to yellow.

.highlight {
  background-color: yellow;
}

12
New cards

Write CSS to change the text color of the element with the ID #footer to white and the background color to black.

#footer { color: white; background-color: black; }

13
New cards

Write CSS to remove all margins and padding from all elements on the page.

* { margin: 0; padding: 0; }

14
New cards

What is the universal selector?

* asterisk  is the universal selector 

15
New cards

Multiple selectors

Using a comma , to separate selectors, matches all listed elements to apply the same styles.

16
New cards

Child selector

using greater than > character, matches any elements where the second element is a direct child of the first element.

17
New cards

Color property

changes the text color 

18
New cards

background-color

roperty specifies the background color, background-color: LightSkyBlue

19
New cards

background-image

property specifies a background image, background-image: url('clouds.png'); 

20
New cards

display property

controls the layout of the element on a webpage.

21
New cards

CSS variable

a custom CSS property that defines a value. 

22
New cards

Float properties

used to position elements to the left or right of their container, allowing text and inline elements to wrap around them. 

23
New cards

Clear properties

used to prevent elements from wrapping around floated elements. It is often applied to an element following a floated element 

24
New cards

box model

defines the layout and structure of an element as a rectangular box consisting of four areas: content, padding, border, and margin.

25
New cards

Text box model - div

div { 

  width: 300px; 

  padding: 20px; 

  border: 5px solid black; 

  margin: 10px; 

26
New cards

Image box model - img

img {  

            width: 100px;  

            padding: 10px;  

            border: 2px solid gray;  

            margin: 15px; 

       } 

27
New cards

What is the purpose of CSS validation?

to make sure the CSS is following the correct syntax rules and ensure that your styles are correctly written and are compatible with all browsers. 

28
New cards

website accessibility

The practice of making a website usable by people of all abilities and disabilities. The designing and developing of a website that can accessed and interacted with by everyone. 

29
New cards

importance of considering website accessibility when developing a website?

Equal access, Wider audience reach, Better user experience, and Enhanced SEO and usability.

30
New cards

Common things to consider when addressing website accessibility?

Color contrast, Text alternatives, Clear and simple language, proper HTML, and Form Accessibility.

31
New cards

Website usability

crucial to create a functional website that helps have a better user experience and customer satisfaction and provides lasting value to visitors. Improve page load speed.

32
New cards

ways to test website usability?

Gather User’s feedback to understand users’ needs a preference. 

33
New cards

Fluid layout

Use percentage-based widths, meaning elements resize relative to the browser window or viewport size. 

34
New cards

Fixed layout

Use specific pixel values to set the width of elements, keeping them constant regardless of the screen size. 

35
New cards

Flexbox

provides an efficient way to lay out elements in a container, so the elements behave predictably when the container is resized or viewed on different screen sizes.  

36
New cards

purpose of a flexbox

Create a flexible, efficient way to arrange and align elements within a container. The layout can be dynamic or need to respond to different screen sizes. 

37
New cards

Grid layout

Layout mode that divides a webpage into a rectangular grid in which to position page elements. Ideal for designing two-dimensional webpage layouts. 

38
New cards

Four position properties

Static, Relative, Absolute, Fixed

39
New cards

Static

The default positioning for all elements. 

40
New cards

Relative

positions the element relative to the element's default position. 

41
New cards

Absolute

positions the element relative to the nearest positioned ancestor. 

42
New cards

Fixed

positions the element relative to the viewport in a fixed location. 

43
New cards

Viewport

the visible area of a webpage. 

44
New cards

Top two mobile web browsers

Safari and Chrome.

45
New cards

mobile websites using three main techniques?

Seperate website, Dynamic Serving, and Responsive web design

46
New cards

Separate websites

Two different websites are created, one for desktop and one for mobile. 

47
New cards

Dynamic Serving

The same URL is requested by both desktop and mobile web browsers. 

48
New cards

Responsive web design

The web server sends back the same HTML to both desktop and mobile browsers. 

49
New cards

Responsive

smoothly adjust the width of the container to fit the browser width.

50
New cards

Adaptive

adapts to the width of the browser at specific widths. 

51
New cards

Screen emulator

Software tool that mimics the display, behavior, and functions of various devices, such as smartphones, tablets, or computers.

52
New cards

Media queries

apply different CSS styles depending on the screen width, height, resolution, orientation, and more. 

53
New cards

Why are media queries used in web development?

to create responsive designs that adapt to different devices and screen sizes. 

54
New cards

What is JavaScript?

High-level programming language for adding interactivity to web pages. Responds to user actions and changes content without page reloads. 

55
New cards

what ways can you add JS to a website? 

Inline, Internal, External

56
New cards

Document Object Model (or DOM)?

A data structure that represents all parts of an HTML document. The JavaScript object document represents the entire DOM and is created from the document's HTML 

57
New cards

Inline

Inside HTML elements.

58
New cards

Internal

In <script> tags within HTML. 

59
New cards

External

Linked .js file for reusable, organized code.

60
New cards

String

Text (e.g., "Hello"). 

61
New cards

Number

Numerical values (e.g., 42, 3.14). 

62
New cards

Boolean

True or false (e.g., true, false). 

63
New cards

Array

Ordered list of values (e.g., [1, 2, 3]). 

64
New cards

Object

Collection of key-value pairs (e.g., {name: "John", age: 30}).