reading-notes

Forms

An HTML form is used to collect user input. The user input is most often sent to a server for processing.

Form Controls

ADDING TEXT

Making Choices

Submitting Forms

Uploading Files

Forms Forms

Form Structure

< form> Form controls live inside a < form> element. This element should always carry the action attribute and will usually have a method and id attribute too.

action Every < form> element requires an action attribute. Its value is the URL for the page on the server that will receive the information in the form when it is submitted.

method Forms can be sent using one of two methods: get or post.

CSS styling

list-style

Type

Unordered Lists

For an unordered list you can use the following values:

Ordered Lists

For an ordered (numbered) list you can use the following values:

1 2 3

01 02 03

a b c

A B C

i. ii. iii.

I II III

Image

The list-style-image property replaces the list-item marker with an image.

Position

The list-style-position property specifies the position of the list-item markers (bullet points).

List Shorthand

The list-style CSS shorthand property allows you to set all the list style properties at once.

Table Properties

to set the width of the table

to set the space between the border of each table cell and its content.

to convert the content of the table headers to uppercase.

to add additional styling to the content of the table headers.

to set borders above and below the table headers.

to align the writing to the left of some table cells and to the right of the others.

to change the background color of the alternating table rows.

to highlight a table row when a user’s mouse goes over it.

JavaScript Events

HTML events are things that happen to HTML elements.

When JavaScript is used in HTML pages, JavaScript can react on these events.

What can JavaScript Do?

  1. Event handlers can be used to handle and verify user input, user actions, and browser actions:
  1. Many different methods can be used to let JavaScript work with events: