Web Development
Build a website of your own, page by page: write each page in HTML, style it with CSS, then bring it to life with JavaScript, and see it change as you type.
Chapters
- Your First Tag
- Paragraphs
- The Frame of a Page
- The Tab's Title
- Attributes and lang
- Any Letter
- Headings
- Headings by Meaning
- Spaces and Enter
- Line Breaks
- strong and em
- More Text Tags
- Inline and Block
- Comments
- Links
- Links That Open a New Tab
- Email Links
- Jump Links
- Images
- alt Text
- Image Size
- HTML Recap
- What Is CSS
- A CSS Rule
- The Browser's Own Styles
- Classes
- Ids in CSS
- Class or Id?
- Two Rules, One Element
- Color Names
- Hex Colors
- rgb() and See-through Colors
- Background Color
- Contrast
- Fonts
- Weight, Style and Case
- Line and Letter Spacing
- Aligning Text
- Pixels and font-size
- rem
- Images That Fit
- CSS Recap
- Project: Crew Profile
- A Second Page
- Paths
- A Menu
- Lists
- Numbered Lists
- Lists Inside Lists
- div
- span
- HTML Recap
- Every Element Is a Box
- Borders
- Margins
- One Side or Four
- Inspect
- Margins That Collapse
- Width and Height
- border-box
- Min and Max Sizes
- Centering a Box
- Centering Text
- The Body Is a Box Too
- display
- Bigger Targets
- overflow
- Cutting a Line Short
- Round Corners
- One Side's Border
- Shadows
- CSS Recap
- Your First Script
- The Console
- Reading an Error
- Comments in JavaScript
- When a Script Runs
- const
- let
- Good Names
- Strings
- Template Literals
- Length and Case
- Quotes Inside Quotes
- Finding an Element
- textContent
- Your First Click
- JavaScript Recap
- Numbers
- Rounding
- Numbers from the Page
- Arrays
- Changing an Array
- querySelectorAll
- For Loops
- Looping Through an Array
- Building a String
- A Loop That Never Ends
- for...of
- Adding Up
- Functions
- Parameters
- return
- Doing or Working Out
- Adding Elements
- Removing Elements
- A List That Doesn't Update
- innerHTML
- Why innerHTML Is Dangerous
- JavaScript Recap
- Project: Cargo Ledger
- Tables
- Header Cells
- Table Sections
- Cells That Span
- HTML Recap
- Elements Inside Elements
- Children Only
- Siblings
- Table Borders
- Attribute Selectors
- :hover
- :focus
- First, Last and nth
- ::before and ::after
- More Pseudo-elements
- Specificity
- The Later Rule Wins
- Inheritance
- !important
- Background Images
- Gradients
- CSS Recap
- true and false
- === and ==
- And, Or, Not
- If/Else
- else if
- The Ternary
- While Loops
- for or while?
- break
- continue
- Objects
- Changing an Object
- Arrays of Objects
- Objects from the Page
- filter
- sort
- sort Changes the Array
- Reordering the Page
- Attributes
- classList
- A Toggle Button
- JavaScript Recap
- Project: Launch Board
- Text Fields
- Labels
- A Hint in the Box
- Forms
- What a Form Sends
- Email and Phone Fields
- Number Fields
- Date Fields
- Checkboxes
- Radio Buttons
- A Question over Choices
- Drop-down Lists
- Longer Texts
- Button Types
- Required Fields
- Length Limits
- Where a Form Goes
- HTML Recap
- Fonts in Fields
- Form Layout
- :focus-visible
- :valid and :invalid
- :user-invalid
- :checked
- Disabled Fields
- accent-color
- Spacing
- Hierarchy
- CSS Recap
- Reading a Box
- The Event Object
- The input Event
- The change Event
- Keyboard Events
- The submit Event
- preventDefault
- Truthy and Falsy
- A Default Value
- switch
- trim
- Searching a Text
- Cutting a Text
- Regular Expressions
- Regex Patterns
- The pattern Attribute
- Error Messages
- setCustomValidity
- An Error You Can Hear
- JavaScript Recap
- Project: Cargo Request
- Header and Footer
- The Main Part
- Landmarks
- Sections
- Articles
- Asides
- The Description
- The Viewport
- Special Characters
- Non-Breaking Spaces
- HTML Recap
- Flexbox
- Flex Direction
- Justify Content
- Align Items
- Gap
- Flex Wrap
- Flex Grow
- Flex Basis
- Flex Shrink
- Align Self
- Order
- Auto Margins
- Relative Position
- Absolute Position
- Fixed Position
- Sticky Position
- z-index
- CSS Recap
- Arrow Functions
- Default Parameters
- Scope
- Styles from JavaScript
- Bubbling
- Event Delegation
- A Script for Every Page
- Open or Closed
- JavaScript Recap
- Project: Spaceport Launch
- A Video
- A Video That Plays by Itself
- A Sound
- Captions
- A Picture and Its Caption
- HTML Recap
- Grid: Rows and Columns
- Sharing the Room: fr
- Rows
- Over Two Columns
- Grid Lines
- Inside a Cell
- The Layout in Words
- Many Columns at Once
- Never Narrower Than
- As Many as Fit
- Flex or Grid?
- Media Queries
- Where the Page Breaks
- Another Layout on a Phone
- Phone First
- A Picture for Each Screen
- Another Picture on a Phone
- CSS Recap
- Is It in the List?
- A Part of an Array
- An Array as One Text
- A Text as an Array
- Change Every Item: map
- One Method After Another
- Many Into One: reduce
- The First That Matches: find
- Is There One? Are They All?
- Every Key of an Object
- Keys and Values
- Each Key With Its Value
- Dates
- A Date to Read
- Days Between Two Dates
- Once, a Bit Later
- Again and Again
- Stop the Timer
- Your Own Play Button
- Sound On, Sound Off
- JavaScript Recap
- Project: Rover Status
- HTML Before ARIA
- A Button That Stays Pressed
- Only for the Eye
- HTML Recap
- A Value Named Once
- A Whole Theme in One Class
- A Change That Takes Time
- How the Change Moves
- Move It: translate
- Turn It, Grow It
- Keyframe Animations
- An Animation That Goes On
- Dark Mode
- Less Motion
- Only for Screen Readers
- CSS Recap
- A Function Inside an Object
- this
- null and undefined
- Stop at Nothing: ?.
- A Value to Fall Back On: ??
- Data as a Text: JSON.stringify
- The Text Back to Data: JSON.parse
- Kept After a Reload: localStorage
- Saving an Object
- Forget One Thing: removeItem
- Map
- Set
- Take the Keyboard There: focus()
- Changes Read Out Loud: aria-live
- The Theme on Every Page
- JavaScript Recap
- Project: My Tasks
- A Card Kept for Later
- Still Loading
- HTML Recap
- A Spinner
- Skeleton Cards
- A Light That Moves
- Only While It Loads
- CSS Recap
- The Page Doesn't Wait
- A Promise
- When the Value Comes
- A Promise That Fails
- async and await
- An async Function Gives a Promise
- Asking with fetch
- Reading JSON
- A Card for Each Starship
- Two Answers at Once
- Busy, Then Ready
- When the Answer Is an Error
- try and catch
- Throwing an Error
- Whatever Happens: finally
- Try Again
- Taking an Object Apart
- Taking an Array Apart
- Taking Apart What a Function Gets
- Spreading an Array
- A Copy with One Change
- Any Number of Values
- Sending Data
- A Form That Sends
- JavaScript Recap
- Project: Space Quiz
- A Script as a Module
- Sharing with export
- Using It with import
- The Main Thing of a File
- One Module, Two Pages
- Classes
- Methods in a Class
- A Class That Starts from Another
- What the First Class Already Does
- A Value Worked Out When Read
- A Value Checked When Written
- A Value Only the Class Can Touch
- Stopping on a Line
- Step by Step
- A Breakpoint in the Code
- Recap
- Project: Lost on the Station