```txt ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ │ href │ ├─────────┬──┬───────────────────┬──────────────────────┬───────────────────────────┬───────┤ │ protocol │ │ auth │ host │ path │ hash │ │ │ │ ├─────────────────┬────┼──────────┬──────────────┤ │ │ │ │ │ hostname │ port │ pathname │ search │ │ │ │ │ │ │ │ ├─┬─────────────┤ │ │ │ │ │ │ │ │ │ query │ │ " https: // user : pass @ sub.example.com : 8080 /p/a/t/h ? query=string #hash " │ │ │ │ │ hostname │ port │ │ │ │ │ │ │ │ ├───────────────┴──────┤ │ │ │ │ protocol │ │ username │ password │ host │ │ │ │ ├─────────┴──┼─────────┴─────────┼──────────────────────┤ │ │ │ │ origin │ │ origin │ pathname │ search │ hash │ ├────────────┴───────────────────┴──────────────────────┴─────────┴──────────────┴───────┤ │ href │ └────────────────────────────────────────────────────────────────────────────────────────────────┘ (all spaces in the "" line should be ignored — they are purely for formatting) ```