I recently took over managing a non-for-profit website and am trying to understand what the previous designer did. I have no problem understanding any of the html or css, however, I can't figure out the syntax in an Anchor Tag. It looks like this:
<a href="stuff.html?SID=af6f7b8287aaf83d48127e9dd3019091#Donations">Current Year</a>
What does the "?" indicate and why is the page location ID expressed in hex? The DOCTYPE is declared as XHTML1.1.
You're looking at parameters being passed via URL. From various places around the net:
A URL parameter is a name/value pair appended to a URL. The parameter begins with a question mark (?) and takes the form name=value. If more than one URL parameter exists, each parameter is separated by an ampersand (&). The following example shows a URL parameter with two name/value pairs:
URL parameters let you pass user-supplied information from the browser to the server. When a server receives a request, and parameters are appended to the URL of the request, the server puts the parameters at the disposal of the requested page before serving that page to the browser.
As to what the name/value pair SID denotes, that's most likely application specific.
The ? indicates the start of a query string. It has a name-value pair, where SID is the name, and the junk afterwards is the value. It's probably a hash for something that can be found in the database on the backend.
The hash just indicates a location on the page. Somewhere on the page there will be an element with the id="Donations". That #Donations in the URI just tells the browser to jump to that point in the page immediately, without the user having to scroll down.
Thank you very much for the explanation. It seems like this is overkill as there are no server side applications involved, the anchor is just referencing another page and page location on the site. BTW, your explanation was excellent.