View on GitHub

reading-notes

Class 04 Reading Notes

Home

Table of Contents

  1. HTML Links
  2. CSS Layouts
  3. JS Functions, Methods, Objects

Links can be used to:

Links are created using <a></a> tags, and anything in between those tags are a clickable link called the link text. The href attribute is where the link goes.

URL stands for Uniform Resource Locator - each page has it’s own unique URL, starting with the site’s domain name, then the path to the specific page.

Absolute URLs link to a different website and include the full URL.

Relative URLs are links within the same site which are just the local path.

When building larger websites, its a good idea to organize pages into folders or directories.

Email links use a mailto: attribute to open an email program and address an email to the specified user.

To open a link in a new window, use target=_blank” after the URL.

To link to a different part of the same page, you can utilize HTML id attribute and HTML elements.

CSS Layouts

CSS treats each HTML element as if it’s in it’s own box. This box will either be block-level or inline.

Block level start on a new line and act as the main building blocks.

Inline flow between surrounding text.

These elements can sit inside each other and be considered containng or parent elements.

CSS has positioning schemes -

JS Functions, Methods, Objects

Functions and methods - Functions consist of a series of statements that perform a specific task. Methods are same as functions except that they are created inside an object.

Objects - made up of properties and methods

A function is declared by giving it a name, then writing the statements of the function within sets of curly braces.

A function is called by using the function name followed by parenthesis. Parameters can be entered into the function by entering them into the parenthesis.