93.1k views
5 votes
Which of the following is NOT a valid URL?

1) /
2) /?page=2
3) #title
4) /#section
5) /#title=10 src=12

User Imani
by
9.1k points

1 Answer

6 votes

Final answer:

Option 5, "/#title=10 src=12", is not a valid URL because it improperly combines a fragment with part of a query string without proper formatting, and contains a space which should be encoded.

Step-by-step explanation:

The question relates to identifying which option listed is NOT a valid URL. URLs (Uniform Resource Locators) are used to reference web resources and typically follow a standard format. Let's examine each option:

  1. "/" - represents a root directory and is a valid URL path component.
  2. "/?page=2" - is a valid URL with a query string parameter used to fetch a specific page, commonly seen in pagination.
  3. "#title" - is a valid fragment identifier, which provides a direct link to a portion of a webpage marked with an id="title".
  4. "/#section" - also a valid fragment identifier, linking directly to a section of the webpage.
  5. "/#title=10 src=12" - is NOT a valid URL since it appears to incorrectly combine a fragment identifier ("#title=10") with what seems to be part of a query string ("src=12") without the proper formatting. It lacks the '?' before the 'src=12' and spaces are not allowed in URLs unless they are encoded.

Therefore, the option that is not a valid URL is 5) "/#title=10 src=12".

User Nibir
by
8.7k points