HTML name attribute deprecated
Just now somebody on IRC was claiming that the "name" attribute in HTML - the one that is used to give form input fields a name to be used in $_GET and _$POST in PHP is in fact deprecated. Quoting About.com that seems indeed true - but you should always double check on the internet, as nobody ever reads specifications right.
The W3C has also a section on this available , and if you only skim you might only see:
"Note that in XHTML 1.0, the name attribute of these elements is formally deprecated, and will be removed in a subsequent version of XHTML."
But if you read correctly, it's only for the elements: a, applet, form, frame, iframe, img, and map.
Today's lesson: always read the specs carefully .
Comments
No name for anchor tags? Does that mean no more #section to jump from place to place in a document?
"Sorry screen readers, I can no longer provide you with a way to skip my 20 item long menu at the top of each page. Enjoy!"
@Josh: Nah... there is the ID attribute for this of course.
@Josh, as is mentioned, you should use the ID element.
On a (Strict?) Doctyped XHTML page, you can reference any element with an ID by the standard hash URL.
For example, I have an ID called content (...). Adding #content to the URL will take me to that location on the page (foo.php#content). Exactly the same behavior as the old name attribute but far easier :)
Life Line
Saw my first Water Rail and Short Eared Owl today. Sadly no photos 😢.
I hiked 9.4km in 6h40m34s
Updated a restaurant
I walked 1.7km in 12m02s
Specify whether crosswalks have tactile paving
Specify whether pedestrian crossings have markings
Determine whether amenities are inside buildings
Specify whether various amenities are covered
Specify leaf types
Specify whether kerbs have tactile paving
Determine the heights of kerbs
Specify whether public transport stops have tactile paving
Survey if places still exist
Missing
Survey opening hours
Specify width of opening
Specify street/place names to addresses
Specify what can be recycled in recycling containers
Specify type of recycling amenities
Determine roads lane count
Specify whether roads have lane markings
Specify whether there are cycleways
Specify road surfaces
Specify whether roads have sidewalks
Specify whether pedestrian crossings have islands

Shortlink
This article has a short URL available: https://drck.me/hnad-5qa