reading notes for code fellows
to write a link, you use the structure <a href="https://linkHere">clickable text</a>. Links can navigate a user between pages, and it is important to have clear link text for users to be able to easily identify it. To link to another site, you need to use the absolute URL. For pages within your own site, you can use a relative URL, which is just the file path within your code.
for larger sites, you should organize your code by putting different sections of the site into different folders. The top level folder is called the root. Each sub-directory should also have an index.html file for the browser to direct itself to.
to link the users email program, you use the same link semantics, but within href, you preceed the email address you want to direct a message towards with mailto:
to open a link in a new window, you add target="_blank" after your site address.
you can also link to different spots within the same page by using IDs to identify spots you want to link to and then use #IDName for the href.
CSS treats all HTML elements as either an inline or block–level box, meaning it either flows within test or start a new line. If one element is inside another, the outer element is know as the parent element. To control where these all are on the page, CSS has positioning schemes.
functions allow you to group a series of statements together to perform a specific task, allowing you to reuse pieces of code. When you run a function from your code, it is known as calling, and you may want to call functions rather than have them all run at once when your page opens. If the function needs information passed in from the page, you put them in the parenthesis and they are called parameters.
to declare a function, you write function nameHere() followed by a code block. To call the function, you need only write its name followed by parenthesis. When you’re returning a value, you end the function with return variableName; If you want to return more than one value, you can use an array.
if you use a function as an expression, it is not necessary to name it, and that is known as an anonymous function. If you want to call a function immediately, you can place parenthesis directly after the closing brackets. Generally you will only use these to avoid naming conflicts between similar blocks of code or assign variables.
variables having different scopes depending on where they are declared. Local variables only exist within a function, and global variables can be accessed by anything.
pair programming involves two roles; the Driver, who is typing and handling all the mechanics, and the Navigator, who guides the Driver without touching the code by thinking about the bigger picture and what needs to come next while scanning for any problems.
learning coding is like learning a new language, and as such it is important to listen to it, speak it, read it, and write it. Pair programming touches on all of those skills, and that makes it a good tool to help you learn. The six big reasons for pair programming are: