HTML Links, JS Functions, and Intro to CSS Layout
Questions
Why this matters
It’s important to know how CSS elements are laid out at first so we can learn how to change that and get it to be laid out in the way we want it to be. Functions are super important because without them we woudld have to re-write code anytime we wanted to do something.
Creating Hyperlinks
- To create a basic link, we wrap text or other content inside what element?- an
<a>
element - The href attribute contains what information?- the web address
- What are some ways we can ensure links on our pages are accessible to all readers? by adding a title
CSS Layout: Normal Flow CSS Layout: Positioning
- What is meant by “normal flow”?- the default layout for css elements
- What are a few differences between block-level and inline elements? block level fills the space in the parent element containing it and inline grows based on the size of the content
- ___ positioning is the default for every html element. static
- Name a few advantages to using absolute positioning on an element. less dependency on margins, good cross-browser support, and less dependence on floats.
- What is a key difference between fixed positioning and absolute positioning? fixed positioning postitions relative to the viewport.
Functions – Reusable Blocks of Code
- Describe the difference between a function declaration and a function invocation. declaration is defining the function and what is does and function invocation is using that function
- What is the difference between a parameter and an argument? parameter is used when declaring the function and arguments are the parameters used when calling a function.
6 Reasons for Pair Programming
Pick 2 benefits to pair programming and reflect on how these benefits could help you on your coding journey.
- engaged cooperation - Learning from one another is going to be a big way we grow in coding and help us understand things that we may not by someone offering a different perspective on how things work.
- Learning from fellow students- some people might know things that I might not know or different ways to do things that are more efficient that I don’t know. It goes the other way as well with me, I might know things or different ways to do things that my fellow classmates might not know, and sharing that information only serves to help us all grow.