Jump to content

Come Again


Guest Anders

Recommended Posts

Is this what your trying to do: http://www.w3schools.com/html/tryit.asp?fi..._link_locationsgive the anchor a name:

<a name="C4">Chapter 4</a>

Then target that name:

<a href="#C4">See also Chapter 4.</a>

note: name has been replaced by id, just so that you are aware :)

Link to comment
Share on other sites

It's been tested and it works to change it to ided anchors.

I know it does, it's just that the tutorial has become a little outdated and still refers to name. I didn't want to totally confuse them by showing an example with name then changing mine to id, just a mention :)
Link to comment
Share on other sites

Name and Id both work, and both verify as xHtml. Is this going to change sometime in the near future? (Replacing name with ID, that is.)

Yes name is deprecated, id has replaced it (strict DTD?). Both should be used at present to ensure backward compatibility. :)
The id Attribute Replaces The name AttributeHTML 4.01 defines a name attribute for the elements a, applet, frame, iframe, img, and map. In XHTML the name attribute is deprecated. Use id instead.This is wrong:<img src="picture.gif" name="picture1" /> This is correct:<img src="picture.gif" id="picture1" /> Note: To interoperate with older browsers for a while, you should use both name and id, with identical attribute values, like this:<img src="picture.gif" id="picture1" name="picture1" />
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...