Skip to content

Instantly share code, notes, and snippets.

@jdursema
Last active August 15, 2017 15:14
Show Gist options
  • Save jdursema/f39e6af91df877dfedb2728a967992fb to your computer and use it in GitHub Desktop.
Save jdursema/f39e6af91df877dfedb2728a967992fb to your computer and use it in GitHub Desktop.
Day 2:
There are three main types of lists in HTML: ordered, unordered, and definition. What are their differences?
Ordered lists are list ordered by numbers. Unorder lists begin with bullet points. And definitiion lists are only made up of terms that are then defined.
What is the basic structure of an element used to link to another website?
<a herf= "url of the page the link takes you to .com"> Text the user clicks on </a>
What attribute should you include in a link to open a new tab when the link is clicked?
You can add an atribute to the link element. After the link, put target= "_blank" and the link will open in a new window.
How do you link to a specific part of the same page?
First, you have to creat an id attribute for the section you want to link to. This could be included in the heading element. Include the attribute id= and name the section of the page. Then, when you create the link, instead of using a url, use href="#" then the name of the section you wish to link to.
What is the purpose of CSS?
It is a programing language that allows you to change the asethetics.
What does CSS stand for? What does cascading mean in this case?
Cascading style sheets. Cascading in this case means that you can use CSS to alter the whole page or a small part of the page and everything in between.
What is the basic structure of a CSS rule?
A CSS rule is made up of a selector and a delcaration. The selector determines what element the rule applies to and the declaration determines how that element is styled.
How do you link a CSS stylesheet to your HTML document?
< link href= "name of the CSS file", type= "text/css" rel= "stylesheet" />
What is it useful to use external stylesheets as opposed to using interal CSS?
It keeps the code more organized and, if you have multiple webpages, you can use the same style sheet instead of having to retype the CSS code.
Describe what a color hex code is.
A hex code is a six digit code that represents the amount of red, green, and blue in a color.
What are the three parts of an HSL color property?
Hue, Saturation, adn Lightness.
In the world of typeface, what are the three main categories of fonts? What are the differences between them?
Serif fonts- have an extra detail, usually a line, at the end of the main strokes of a letter
Sans Serif fonts- Do not have the extra detail
Monospace fonts- have a fixed width for each letter.
When specifiying font-size, what are the main three units used?
Pixels, Percentages, and EMS
Day 3:
If you're using an input element in a form, what attribute controls the behavior of that input?
Type
What element is used to create a dropdown list?
< select name="" >
If you're using an input element to send form data to a server, what should the type attribute be set to?
action
What element is used to group similar form items together?
fieldset
Describe the differences between border, margin, and padding.
boarder- is the invisible or visible line around a box
margin- the space outside the boarder.
padding- the space between the text or image and it's boarder
For a CSS rule padding: 1px 2px 5px 10px, what sides of the content box does each pixel value correspond to?
1 px- top
2 px- right
5 px- bottom
10px- left
Describe the different between block-level and inline elements.
A block level elements starts on a new line while inline elements flow between surrounding text.
What is the role of fixed positioning, and why is z-index important in the scenario of using fixed positioning?
Elements with fixed positioning do not move position when the user scrolls through the page. The Z index property allows you to control which box appear on top, so if you have an element with a fixed position, you can have it move behind another box if necessary.
What is the difference between a fixed and liquid layout?
Fixed layouts, in which pixels are used in the measurment, do not increase in size as a browser window gets bigger and smaller. A liquid layout does because percentages are used with measurements.
Day 4:
In an image element, why is the alt attribute important?
It provides a text description of the image if a person can't see it.
What determines if an image element is inline or block?
If the image is included in a p or h1 element it will be considered a block element. If the image is part of a <b>, <em> or <img> element it will be a inline element.
What are the benefits of jpg or png image file formats?
jpg is best to use when there are lots of colors in an image. Png is better for images with few colors or large areas of the same color.
What is the benefit of specifying the height and width of images in CSS compared to specifying in the HTML?
In CSS you can control the height and width for the image. Images take longer for pages to load than the rest of the code, so by making space for it in the CSS code, the page will load as it even if the image takes a long time to load.
What is an image sprite, and why is it useful?
An image sprite is when a single image is used for multiple things on a web page. It allows webpages to load faster because the browser only needs to request one image.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment