HTML Notes

Resources


Types of self-closing tags (aka empty elements)

  • <hr> - horizontal line
  • <br> - break
  • <img> - image (has attributes src, alt, height, width)
  • <input> - allows website user to enter data
  • Complete list here

HTML Forms

Types of input field:

  • text
  • email
  • date (e.g. birthday, booking choice, etc)
  • password
  • radio
  • checkbox
  • select (dropdown menu)
  • submit / reset buttons

Example Form:

Your Details



Favourite colour

Pets

Region


What this form looks like in HTML:

html form example
Simple HTML Form Example

Div and Span

The <div> and <span> tags are used to divide up areas of HTML to be styled in CSS.

Div allows blocks of content to be selected. Span is an inline version for selecting smaller areas within an element.