HTML Links, CSS Layout, JS Functions
HTM
Links
Duckett’s HTML talks about links on pages 74-94. Links are an important behabior of web page aplications.
- The a element is composed of the opening and closing tag and is called an anchor. Inside the tag the link element contains the href attribute that can guide where the link will travel to and whether it will be a local, new tab or window, or even an email or phone number.
Styling of a link compromises of figuring out if the developer needs the link to look different between events: we can change how the on mouseOver (hover) will change the cursor or the anchor text and look.
We can use the anchor tag to link to an element in the current page by using the id of the targeted element within a page to transition to, or use the similar structure between the folders in our web pages to follow the transition from our index to the correct folder we are traveling to within our html documents.
CSS
Layout
Layout has to do with how we can structure the styling of our document to better represent our HTML document. Using the box model and understanding how the layout display attributes work we can use the CSS rules to better represent the element box model, and how the properties like static, absolute, fixed, and others can affect how these “boxes” appear. For example, while static is the default way we represent the box model elements, we can use the absolute positioning to make the other ignore the absolute-positioned boxes, as this takes the box of the regular structure of things. There are other attributes too that can show us the correct way to implement design ideas. When we position out elements, and we display them in the correct layout and inline or block display, we can also use the z-index attribute to correctly position an element in front or behind another to create depth and richness to our design.
Javascript
Functions methods and objects work together to represent real world information programmatically and we can use code to stand in for them and making programs to interact with these representations like we would their real world counterparts.
Functions
Methods are a set of instructions that can be called multiple times to create one specialized action multiple times. By coding once we can use this effectively over and over and save time.
Methods
Methods are the helper functions that we can use to regulate and control the way the variables and information in our functions behave. Using the toUppperCase method with string we can make sure all string we save on an array can be formatted the same. Also, if we wanted the numbers with decimals to be rounded down, we can use the built in methods like ceil or floor to round up or down as needed.
Objects
Objects represent functions and variables to represent a real world object. An object like car would have functions like accelerate and break, while variables would include wheels and doors. By representing the features and behaviors of a car this way we could represent and code a virtually identical model based on code. We could also crate variations without the need of physical space for our purposes.