reading-notes

These are my reading notes for Code Fellows


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

Home

Reading Notes Code 201: Day 9

Notes - HTML/CSS Book, Chapter 7: “Forms” (p.144-175)

Types of form controls

In a form where a user inputs their username, when they click ‘submit’, this information gets sent to the server which is processed with PHP, C#, Java. How will we use this info?

<input> creates a form

type="text" allows for one line of text

type="password" creates a password entry area (hides the characters for privacy)

name="name" the server will need to know what has been entered (kind of like a console.log)

maxlength sets the max length of a text entry. Useful if you’re only allowing a user to enter a year or date

textarea creates an expandable text entry area instead of a single line

input type="radio" creates a radio button

input type="checkbox" creates a checkbox

select name=" " creates a drop down list box

fieldset groups together related forms, even adds a little box around the choices if you add <legend>Group Details</legend> to the top of the code!

required="required" shows that an entry is required


Notes - HTML/CSS Book, Chapter 14: “Lists, Tables & Forms” (pp.330-357)

Bullet styles for unordered lists:

Styles for ordered lists:

Use images for bullet points by adding the following to CSS:

ul {
    list-style-image: url("img/example.png");
}

list-style-position: outside; places the bullet point directly to the left of the text

list-style-position: inside; places the bullet point inside the text box, but indents the first line

Table properties:


Notes - JS Book, Chapter 6: “Events” (pp.243-292)

When you browse the web, your browser registers different types of events. It’s the browsers way of saying, “Hey, this just happened.” Your script can respond to these events.

-Jon Duckett, JavaScript & JQuery, page 244

Types of events (among many):

How code is triggered by an event:

(Text in quotations is taken from Jon Duckett JavaScript & JQuery page 249)

  1. Element is decided on (“select an element”)
  2. An event within that element will create a response (“specify event”)
  3. Code that will run once that event happens (“call code”)

element.onevent is how you attach an event to an element

addEventListener can recognize several functions simultaneously

Event Bubbling vs Event Capturing with regards to Event Flow

In Event Bubbling the event flows outward from a specific node to the least specific. This is the default.

In Event Capturing the event flows inward from the least specific no to the most specific.