You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When is it useful to use external stylesheets as opposed to using interal CSS?
Internal stylesheets should be used when one document has a unique style. External stylesheets are best used when a
style is being used for multiple documents so you can change the look of a whole website by only having to change one
file by using the tag which goes inside .
Describe what a color hex code is.
Hex codes are a hexadecimal code made up of 6 digits and represents 3 different values relating to red, green, and ###### blue the code starts with a # sign, an example is #66cdaa where 66 is the red, cd is the blue, and aa is the green.
What are the three parts of an HSL color property?
CSS3 uses HSl which is a more intuitive way to select colors. HSL refers to Hue Saturation and Lightness, Hue is
basically a point on a color wheel, Saturation is a percentage of grey that exists in the hue, and lightness is
a percentage of white or black in the hue 0% white = 100% black.
In the world of typeface, what are the three main categories of fonts? What are the differences between them?
The three main categories of fonts are serif, sans-serif, and monospace. Serif type has extra details on the ends of
the major strokes of letters and traditionally are considered easier to read. Sans-serif type has straight ends to
letters and are easier to read if the text is small compared to serif and monospace. Monospace or fixed-width
font is used mainly for programming because every letter is the same width and therefore lines up nicely and is
easier to follow.
When specifiying font-size, what are the main three units used?
The main three units used in specifiying font-size are pixels, percentages, and ems. Pixels are the best way to
manipulate your font-size for uniformity, because percentages and ems will vary if the user has changed the default
size of text in their browser. Pixels are also relative to the resolution of the screen. Percentages can be used to
the size of all font on a page usually the default is 16px unless the user has changed the setting in the browser. Ems
allows you to change the font-size relative to the font-size in the parent folder.
Day 3
Chapter 7 questions
If you're using an input element in a form, what attribute controls the behavior of that input?
The type attribute controls the behavior of an input.
What element is used to create a dropdown list?
The <options element is used to create a dropdown list.
If you're using an input element to send form data to a server, what should the type attribute be set to?
If you are using an input element to send form datat to a server the type attribute should be set to submit.
What element is used to group similar form items together?
To group similar form items together use the element fieldset.
Chapter 13 and 15 Questions.
Describe the differences between border, margin, and padding.
Borders are inherent in every box, even if they are 0% opaque they exist and server as a space between boxes. The
margin ist the space that exists on the outside of the borders. The padding is the space that exists inside the
border.
For a CSS rule padding: 1px 2px 5px 10px, what sides of the content box does each pixel value correspond to?
The code will be read as top, right, bottom, and left. So the 1px of top padding, 2px of right padding, 5px of
bottome padding, and 10px of left padding.
Describe the different between block-level and inline elements.
Inline elements use < span > and basically a inline element does not cause a line break and does not take up
the width of the whole page just the width of its opening and closing tags. Block line elements use < div > start on
a line break and take up the whole width of the page.
What is the role of fixed positioning, and why is z-index important in the scenario of using fixed positioning?
position: fixed; fixes an element to the viewport so when a user scrolls it stays in the same place on the screen.
When using position: fixed; boxes will over lap and the one that comes latest in the code will be shown on top, you can
use z-index to manipulate the order in which boxes appear.
What is the difference between a fixed and liquid layout?
Fixed layouts do not change size as the user increases or decreases the size of their browser window, as where a liquid
layout stretch and contract with the browser window as the user manipulates it.
Day 4
Chapter 5 questions.
In an image element, why is the alt attribute important?
The alt attributed is important in an image element because if for some reason the browser or user cant view the image
the alt attribute will supply a text description of the image and present in it in place of the image. This is
important for blind users and users in different browsers.
What determines if an image element is inline or block?
Images are both, inline in the sense that they flow with texts, though they have a defined height and width like a
block element.
What are the benefits of jpg or png image file formats?
Jpg files are used when an image has multiple colors, as it will save in more detail but if not recommended for
archiving. Gif or Png is used when there are few colors or large solid blocks of the same color.
Chapter 16 questions
What is the benefit of specifying the height and width of images in CSS compared to specifying in the HTML?
While specifying the height and width of an image in HTML will load the page faster specifying in CSS will allow you
to control the hieght and width of all images on a page by manipulating one code as opposed to having to interact
with each image individually.
What is an image sprite, and why is it useful?
An image sprite is a large image made up of the static background of a page, and use of an image sprite can reduce
the amount of http requests on the page which will help the loading speed of the site.
Day 5
Chapter 2 Questions.
How do you declare a variable. What does the equals sign really mean in JavaScript? What is it called in JavaScript?
To declare a variable you need to use the keyword var followed by the name of the variable if it is two or more
words use camelCase. The = is used to assign a value to a variable, in javaScript it is refered to as an assignment
operator.
There are three big data types in JavaScript: numbers, strings, and booleans. Describe what each of them are.
Numbers : numeric data is used for task that calculate or count, in addition numeric data will be used to format screen
size, ratio, etc.
Strings : String data consists of letters and other characters and is enclosed by "..." this type of data often
contains html markup and is used to add new content to a page.
Booleans : Booleans have one of two values, true or false, and can be thought of as a light switch it is either on
or off.
What are the six rules for naming variables? What are a few JavaScript reserved words that you should avoid using for
variable names?
First the name must begin with one of the following a letter, a $, or a underscore. Secondly the name can contain
letters, $, underscore, but must not include a period or (-). Third you can not use keywords or reseerved words like
abstract, else, float, class, null, etc. Fourth all variables are case sensitive so Score does not equal score. Fifth
Use a descriptive name for your variable like firstName for the user's first name. Sixth use camelCase for names that
are a longer than one word.
How can an array be useful when dealing with multiple related values? How do you access/change a value in an array?
Arrays can be useful when dealing with multiple related values because you dont need to know how many items a list will
contain when creating an array. Also an array is created like you would a variable for example (var colors;) creates a
array for colors. If you wanted to change/access a value in an array you would first recognize that values in an array
work on a numbers list that starts with 0. To access a value in an array you use the array name and specify the index
number in [ ] afterwards. You can change an the value of an array just like you would any other variable, by selecting
it and assigning it a new value.
What is the difference between an expression and a statement?
An expression results in a single value and can be broken into two types. Expressions that assign a value to a
variable, and expressions that use 2 or more values to return a single value. A statement is a complete line of code ###### that performs some action, while a expression evaluates to a value.
What are three types of operators and how are they used?
Arithmetic operators are used to do arithmetic such as addition, subtraction, etc.
String operator is used to join strings on either side of the + together.
Assignment operators are used to assign a value to a variable, i.e. colors.
Day 6
Chapter 3 questions.
If we have a function defined as function sayHello(){console.log("Hello!")}, what is the difference between entering sayHello and sayHello() in the console?
If the fuction sayHello(){console.log("Hello!)} is declared in the console then sayHello will give you the declared
function while sayHello() will run the function and deliver a Hello!
What is the difference between function parameters and arguments?
Function parameters are bits of information that are passed to the function, and is told in the declaration of the
function. Function arguments are actual values that get passed to the function.
What is the keyword return used for?
The keyword return is used to send data back to the caller of the function, it can have a value or no value and is used
to exit a method. It is coupled with a value that indicates the information that should be returned to the caller/user.
How are local variables better than global variables? Are there instances you can think of where you might want to use a variable that is globally scoped over local?
Global variable are declared outside of any function and can be used by any function in the code, Local variables are
declared inside a function and can only be used by that function. Global functions are used throughout the code and in
larger coding projects can become problematic as the variable may have unwanted effects on the code and if they are
global then it can be a task to find which functions are causing the problems or unwanted effects.
Global variables would be good to use in a smaller progam can make it easier to access variables and limit the creation
of local variables which would lessen memory usage.
User Interface/User Experience (UI/UX) Questions.
What is the user’s motivation to be here in the first place?
An example of a website that I believe answers this question well is https://www.google.com/. I feel like they asked
themselves why do people use this site and created a simple to the point website.
An example of a website that didnt put much thought into this is http://www.openculture.com/. The front page is a ###### convoluted and misleading.
Are you being clear and direct, or is this a little too clever?
A great example of a clear and direct website is https://tinkerwatches.com/ the minimalism and pertinent information
http://weaintplastic.com/ is a nicely designed website and is pleasing but the only attribute that sets clickable items
from non-clickable items is a slight movement in the text (which is all similar). In fact most things that look clickable, like underlined or off-colored text is not clickable.
Does it sound confident and tell the user what to do?
https://turbotax.intuit.com/ is a great example of taking a complicated task and walking a user through it step by ###### step. It instills confidence in the user by offering extra info and reassuring the user that steps have been completed ###### properly.
https://www.goodreads.com/ is a great resource, but the first time you visit it you can see a lot of information, but
there is little information on what the website is for and what any of the information on the home page means. There
isn't any direction to point a user toward how to use the site nor what it is capable of.
Are you looking for subjective opinions or objective facts?
https://crazyegg.com/ is an example of a website and tool that can be used to track a user's mouse and returns data in
a heatmap, and it can be helpful in understanding where a user is most active, an is an example of a website looking
objective facts.
https://www.yelp.com/ is as we know a way for reviews of any business to be made public, and is an example of a website