Skip to content

Instantly share code, notes, and snippets.

@dstock48
Last active March 11, 2017 05:29
Show Gist options
  • Save dstock48/ad0f21d09911d129ad891c1346518d0f to your computer and use it in GitHub Desktop.
Save dstock48/ad0f21d09911d129ad891c1346518d0f to your computer and use it in GitHub Desktop.
1703 FE - Prework

Prework - Day 1

##HTML & CSS Quiz: Chapter 1 & 2

  1. On a website, what is the purpose of HTML code?
  • The HTML code of a website provides the structural skeleton for the page.
  1. What is the difference between an element and a tag?
  • Most elements have 2 tags, an opening and closing tag. The opening tag can contain various attributes about the element.
  1. Why do we use attributes in HTML elements?
  • Attributes provide additional (sometimes manditory) information about the HTML element.
  1. Describe the purpose of the head, title, and body HTML elements.
  • Inside the <head> element, we place code that is not meant to be displayed on the page. This code is generally either metadata, links, or scripts.
  • The <title> element is used (unsurprisingly) for the title of the HTML document. The title text gets displayed in the tab/title bar of the browser application.
  • The <body> element is where all of the main content of the webpage is located.
  1. In your browser (Chrome), how do you view the source of a website?
  • ⌥⌘U (alt-command-U)
  1. List five different HTML elements and what they are used for.

  2. <h1-6> - Heading elements: used for the titles or section names of the document

  3. <a> - Anchor element: used to link to other documents/destinations

  4. <img> - Image element: used to represent image files

  5. <script> - Script element: used to embed JavaScript code within an HTML document or link to code in a .js file.

  6. <article> - Article element: used to represent a self-contained body of work that can stand on its own and be redistributed (such as forum posts, news articles, blog entries)

  7. What are empty elements?

  • Empty elements are composed of one single self-closing tag and cannot contain any content or child elements.
  1. What is semantic markup?
  • Semantic markup is the use of HTML elements which describe the nature and purpose of their content.
  1. What are three new semantic elements introduced in HTML 5? Use page 431 in the book to find more about these new elements.
  • <header>, <nav>, <section>

##Codepen link Prework Codepen

##Gear Up

  1. What role does empathy play in your life and how has it helped you?
  • Empathy has always played a significant roll at my previous jobs in technical support. Its has always been important for me to remind myself that the person on the other end is genuinely struggling and seeking assistance. No matter how trivial the problem may be, or how many times they might have asked before.
  1. How does empathy help you build better software?
  • When you fully understand your users, and have a sense for how and why they use something the way they do, it allows you to design software that better caters to its userbase.
  1. Why is empathy important for working on a team?
  • While working on a team, there will inevitably be a time when there are differing opinions. Empathy helps both sides see each other's perspective and potentially arrive at a solution that caters to both, or help one side see why objectively one option is better than another.
  1. Describe a situation in which your ability to empathize with a colleague or teammate was helpful.
  • When helping a new co-worker, empathizing with their situation and remembering how it felt to be totally new helped a lot as I was guiding a new team member through the fix for a strange issue reported by a client. Having empathy is enough to turn that sort of interaction from 'just fixing it for them', to 'teaching them how to fix it'.
  1. When do you find it most difficult to be empathetic in professional settings? How can you improve your skills when faced with these scenarios?
  • When a co-worker or team member has made a mistake or caused an invonvenience, it can be hard to get past the frustration and instead empithize with them and the fact that they (hopefully) didn't do it on purpose. In those cases it can help to take a moment to relax and see things through the other persons eyes. Maybe there is a good reason that this mistake was made, or maybe the mistake wasn't actually that person's fault at all.

Prework - Day 2

##HTML & CSS Quiz: Chapter 3 & 4

  1. There are three main types of lists in HTML: ordered, unordered, and definition. What are their differences?
  • Unordered Lists: meant for content in no specific order
  • Ordered Lists: meant for content that should be presented in a specific order
  • Definition (or Dictionary) Lists: meant to be used with term/definition pairs, like in a dictionary.
  1. What is the basic structure of an element used to link to another website?
  • <a> the tag itself
  • href="#" the referenced link
  • <a>content</a> the hyperlinked content
  1. What attribute should you include in a link to open a new tab when the link is clicked?
  • target="blank"
  1. How do you link to a specific part of the same page?
  • By using the id attribute on HTML elements, you can link to the position on the page where they are located by setting the href attribute of an achor tag to point to #elementName

##CSS Quiz: Chapter 10, 11 & 12

  1. What is the purpose of CSS?
  • CSS is meant to add a layer of style over the structure of an HTML document.
  1. What does CSS stand for? What does cascading mean in this case?
  • Cascading Style Sheets. Cascading refers to the idea that CSS rules cascade from top to bottom, and that rules closer to the bottom can overwrite previous rules.
  1. What is the basic structure of a CSS rule?
  • A CSS rule is composed of a selector, and property, and a value.
  1. How do you link a CSS stylesheet to your HTML document?
  • A .CSS file can be linked to an HTML document using the <link> element inside of the <head> element.
  1. Why is it useful to use external stylesheets as opposed to using interal CSS?
  • Multiple pages can be linked to the same stylesheet. This allows a single change to effect many pages at once.
  1. Describe what a color hex code is.
  • A color hex code is a 6 character string using a mix of 16 characters (0-9 a-f) to represent values of red green and blue.
  1. What are the three parts of an HSL color property?
  • Hue: the degree of color along the color spectrum
  • Saturation: the amount of color
  • Lightness: the lightness of the color relative to pure white
  1. In the world of typeface, what are the three main categories of fonts? What are the differences between them?
  • Serif: letters have serifs
  • Sans-Serif: letters do not have serifs
  • Script: mimics a hand-written style
  1. When specifiying font-size, what are the main three units used?
  • px, em (or rem), pt

Prework - Day 3

##HTML & CSS Quiz: Chapter 7

  1. If you're using an input element in a form, what attribute controls the behavior of that input?
  • The type attribute is used to specify the behavior of an input element.
  1. What element is used to create a dropdown list?
  • The <select> element is used to create dropdown lists with <option> elements inside.
  1. If you're using an input element to send form data to a server, what should the type attribute be set to?
  • You can use type = "submit" to send form data to a server
  1. What element is used to group similar form items together?
  • The <fieldset> element is used to group similar or related form items together.

##HTML & CSS Quiz: Chapter 13 & 15

  1. Describe the differences between border, margin, and padding.
  • Padding is the space between the content and the border. Border is the space between the padding and margin. Margin is the space outside of the border.
  1. For a CSS rule padding: 1px 2px 5px 10px, what sides of the content box does each pixel value correspond to?
  • Clockwise starting at 12 (Top, Right, Bottom, Left)
  1. Descirbe the different between block-level and inline elements.
  • Block elements stretch to take up as much horizontal space as there is room for. Inline elements are only as wide as their content.
  1. What is the role of fixed positioning, and why is z-index important in the scenario of using fixed positioning?
  • An element with position: fixed will be removed from the flow of the document and will remain fixed to a specified locaion in the document. The z-index of the element is important to make sure that it does not get covered up by any of the other elements on the page.
  1. What is the difference between a fixed and liquid layout?
  • A fixed layout is definied in absolute values and will always remain at the same size. Liquid layouts are generally defined in percentages and will expand/contract with the size of the browser window.

Prework - Day 4

##HTML & CSS Quiz: Chapter 5

  1. In an image element, why is the alt attribute important?
  • The alt attribute is important for screen readers to use for vision impaired users, and as a placeholder when images fail to load.
  1. What determines if an image element is inline or block?
  • By default all images will be inline elements. Using CSS this can be changed to display: block
  1. What are the benefits of jpg or png image file formats?
  • PNG image files have the benefit of supporting transparency, however their file sizes are generally a bit larger. JPG image file sizes are generally smaller while loosing very little image quality.

##HTML & CSS Quiz: Chapter 16

  1. What is the benefit of specifying the height and width of images in CSS compared to specifying in the HTML?
  • Following "separation of concerns", the width/height of an image is not structure, its presentation, and so it belongs to CSS.
  1. What is an image sprite, and why is it useful?
  • An image sprite is a single image composed of multiple smaller images. Using background-position in CSS you can tell an element to use a specific portion of the image sprite file. This allows a single loaded image to be used for multiple purposes.

Prework - Day 5

##Eloquent JavaScript: Chapters 1 & 2

  1. There are three big data types in JavaScript: numbers, strings, and booleans. Describe what each of them are.
  • Numbers: Numeric values that are either whole numbers (integers) or fractional numbers (floats).
  • Strings: This data type is used for text content and must be enclosed in either single or double quotes.
  • Booleans: This value has only 2 options. True or False. It is mainly used for logic.
  1. What are the three logical operators that JavaScript supports?
  • && (and), || (or), ! (not)
  1. What is the naming convention used for variables?
  • Variables use a naming convention called Camel Case in which the first letter of each word is capitalized except the first. Variable names cannot include any spaces.
  1. What is the difference between an expression and a statement?
  • An expression is any peice of code that produces a value, while a statement can be composed of multiple expressions.
  1. What are a few JavaScript reserved words, and why are they important to avoid using them for variable names?
  • const, let, var, if, while, for
  • It is important not to use keywords or reserved words as variable names because they are specifically meant to be used for other purposes.
  1. What is control flow, and why is it useful for programming?
  • Control flow is the direction and order in which lines of code in JavaScript are executed. It is useful so that there is some order and predictability as to when and how the code is run.

Prework - Day 6

##Eloquent JavaScript: Chapter 3

  1. If we have a function defined as function sayHello() {console.log("Hello!")}, what is the difference between entering sayHello and sayHello() in the console?
  • sayHello is a reference to the codeblock contained in the sayHello function. sayHello() is an execution of the code in the function.
  1. What is the keyword return used for?
  • Inside a function, return is used to pass the value generated by the function to the next piece of the program.
  1. What are function parameters?
  • Parameters are like variables that are declared as a function is called, and passed into the function.
  1. What is the naming convention used for function names?
  • Functions follow the same naming convention as variables, camel-case. For constructor functions, the first letter should be capitalized.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment