Skip to content

Instantly share code, notes, and snippets.

@mike-duke
Last active November 21, 2017 05:43
Show Gist options
  • Save mike-duke/95269f436e5f80ffc5c18b2de4195e6c to your computer and use it in GitHub Desktop.
Save mike-duke/95269f436e5f80ffc5c18b2de4195e6c to your computer and use it in GitHub Desktop.
@mike-duke
Copy link
Author

Chap 13 and 15 HTML and CSS questions:

  1. A border surrounds an HTML element and separates the edge of one box from another. A margin is the area outside of the border that can be adjusted to create a gap between elements. Padding is the area between the border and the content of the element.
  2. In a CSS rule, the content box is described clockwise from the top, so top, right, bottom, left.
  3. Block-level elements always start on a new line. Inline elements do not.
  4. When an element is in a fixed position, it stays in position relative to the browser window, not the surrounding content. The z-index is important because fixed positioning can cause elements to overlap. Z-index controls which elements are "in front" of which other elements.
  5. A fixed layout is usually set in pixels and does not change with a change in the screen size. A liquid layout is usually set in percentages and does change with different screen sizes.

@mike-duke
Copy link
Author

Chap 5 HTML and CSS questions:

  1. The "alt" attribute for an image is important because it allows for a text description that can be used by screen readers for the visually impaired as well as search engines.
  2. The "img" html element is inherently and inline element. It would need to be altered using CSS to make it a block element.
  3. The JPG file format is typically used for photographs while the png file format is typically used for simpler, monochromatic images, like logos.

@mike-duke
Copy link
Author

Chap 16 HTML and CSS questions:

  1. The benefit of specifying height and width of any image is so that the browser will render the image correctly as it loads. However, the benefit of using CSS over HTML to specify this is so that a class of images can be created and all images in that class can be specified at once.
  2. A sprite is a single image used for several different parts of an interface. This is useful because the browser only needs to load the one image for several uses, thus speeding up load times.

@mike-duke
Copy link
Author

Chap 1 and 2 Eloquent JavaScript questions:

  1. In JavaScript, a number is just a number. It's presented in a statement without quotes. A string is a line of text, presented in quotes. Boolean data consists of true and false.
  2. The three logical operators of JavaScript are: and, or, and not, represented by &&, ||, and !, respectively.
  3. With the exception of some reserved words that JavaScript uses as keywords, a variable can be called almost anything. Typically, variable names are not capitalized, but multiple word names can be for clarity, though it is common to leave the first word uncapitalized. No spaces are allowed.
  4. An expression is a fragment of code that produces a value. A statement is a complete instruction to be executed by the web browser.
  5. With, Yield, Interface, Function, If, and False, are examples of reserved words in JavaScript. They are to be avoided for variable names because the language sees them as keywords that have meaning beyond whatever value given by the variable.
  6. Control flow is the order in which JavaScript statements are executed--from top to bottom--which allows for predicability and consistency in execution.

@mike-duke
Copy link
Author

Chap 3 Eloquent JavaScript Questions:

  1. Typing "sayHello ()" will call the function, whereas typing "sayHello" will not.
  2. The "return" keyword determines the value a function returns to the console.
  3. Function Parameters are the names listed in the function definition. Like variables, but their values come from elsewhere.
  4. Function names, like variable names, can be just about anything other than JavaScript's reserved names. However, it's also advisable to keep names short and concise in order to contribute to readability.

@mike-duke
Copy link
Author

UI/UX Questions and websites:
Do clickable things look different than non-clickable things? YES: https://4rsmokehouse.com/
NO:
Do users think it looks good? Do they trust it immediately?: YES: http://www.cobbpediatric.com/
NO: http://www.suzannecollinsbooks.com/
Does it reduce anxiety? YES: https://www.airbnb.com/
NO: http://www.007museum.com/
How does this make them feel? GOOD: https://www.kindsnacks.com/
NOT GOOD: art.yale.edu
Could you solve this just as well with something more common?: NO: https://www.indeed.com/
YES: https://www.amazon.com/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment