reading-notes

Intro to coding and software development.


Project maintained by Draquix Hosted on GitHub Pages — Theme by mattgraham

Reading Notes 03

by Daniel Rogahn

Chapers 3 and 13 from HTML, and JavaScript chapters 2 and 4

HTML can be used to structure lists that are ordered by enumerating each item, or unordered which may use a bullet point or no symbol depending on the CSS style, or be concepts with definitions. Lists can be nested inside lists.

The size of the boxes that surround elements can be measured in pixels (px), ems (which are standard size of the font), or by percentages. Width and height can be controlled by CSS. Sometimes information doesn’t fit within a box, and it’s called overflow. Overflow can be hidden or have a scroll bar or bleed over the next element(though it’s not recommended practice). The box model is that a box’s content is the padding, which has a border, and then there’s a margin of space between other items and all these things can be manipulated with CSS. A property display can have the inline-block attribute which allows elements to be side by side. The border radius can control rounded edges.

Statements are single instructions, one step in executing a task. An expression is when things are compared in a way that returns true or false or performs a mathematical operation. Data can be stored in a variable, and an array can hold multiple bits of data. Operators indicate math to be performed.

Code often needs to make a decision. If statements evaluate an expression and execute code dependant on whether it’s true or false. An if else is run if the preceding evaluation was false. Some evaluations are greater than less than or equal to. Sometimes we want to do things multiple times with a loop. A while loop does it as long as an expression is true. A for loop sets a variable that counts and limits how many times it can be run. A do while loop does the code once and then evaluates whether to do it again.