When you visit a web page, you type in a web address, also known as a URL (uniform resource locator) . That URL contains precise instructions on where that page is located on a specific web server. The URL can be simplejust the name of a site, such as http://www.samspublishing.com. Or it can be much more complicated, and point to a specific location on that site, such as http://www.samspublishing.com/title/0672326906.
URL (uniform resource locator) An Internet address that uniquely identifies a location on the Internet, such as http://www.google.com.
There's method behind the seeming madness of the confusion of slashes , characters , and dots that make up a URL. As you'll see as you use this book, you'll need to understand that method in order to build your website. This image shows you a URL with all the parts labeled.
The parts of a URL .
Protocol This determines what kind of Internet protocol should be used. For the Web, it's HTTP.
Domain name This directs the browser to the proper web server on the Internet. Behind the scenes, DNS is translating that domain into IP numbers . Note the first three letters in front of the domain, www.
Pathname This identifies the directory on the server where the page is located.
Filename This is the file itself that the browser is looking for. The file has to end in a .htm or .html extension for the browser to recognize it as a web page.
So, when someone types this URL into a browser, it uses the HTTP protocol to connect to the samspublishing.com server, and gets the allin1.htm web page in the /books directory. Note that this URL is an imaginary one, so it won't workwe use it here only as a fictional example.