Draw This - beginner
Draw a labeled diagram showing the main parts of the URL: https://www.example.com:8080/path/to/page?search=books#section2. Label each part clearly.
Jump into concepts and practice - no test required
Draw a labeled diagram showing the main parts of the URL: https://www.example.com:8080/path/to/page?search=books#section2. Label each part clearly.
URL: https://www.example.com:8080/path/to/page?search=books#section2 |-------| |----------------| |----| |--------------| |----------| |---------| Protocol Domain name Port Path Query Fragment (https) (www.example.com) (8080) (/path/to/page) (search=books) (#section2) Diagram: +-----------------------------+ | https:// | <-- Protocol (How to connect) | www.example.com | <-- Domain (Website address) | :8080 | <-- Port (Optional number) | /path/to/page | <-- Path (Page location) | ?search=books | <-- Query (Extra info) | #section2 | <-- Fragment (Page section) +-----------------------------+
This URL has several parts:
https tells the browser to use a secure connection.www.example.com is the website's address.8080 is an optional number specifying the server port./path/to/page shows the exact page or folder on the website.search=books provides extra information to the server, like a search term.#section2 points to a specific part of the page.Think of the URL like a mailing address: protocol is the delivery method, domain is the city, port is the building entrance, path is the street and house, query is a note for the delivery person, and fragment is the room inside the house.
https://www.example.com:8080/path?query=123#sectionhttps://www.example.com:8080/path?query=123#section, the scheme is https.http://example.com:80, which correctly places port 80 after the domain with a colon.https://shop.example.com/products/item?id=12345&color=red#reviews/products/item, Query: ?id=12345&color=red. The fragment #reviews is not part of path or query.ftp//files.example.com/downloads/file.zipftp:.ftp// missing the colon after ftp. Correct form is ftp://.https://app.example.com/user/789), the section to show is a query parameter (?section=settings), and the fragment points to a page section (#settings).#settings. Others mix fragment and query incorrectly or mismatch sections.