Guest Anders Posted June 12, 2006 Share Posted June 12, 2006 Hi.. Im new to this HTML thingy so I need som help to create named anchors...Here's the tortual.. <a href="http://www.w3schools.com/html/html_links.asp">HTML Links</a>Then again.. I really dont know why this link did'nt work... Btw: U need to scroll down a bit, I cant make named anchors u know! Link to comment Share on other sites More sharing options...
scott100 Posted June 12, 2006 Share Posted June 12, 2006 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 More sharing options...
snowboard01 Posted June 12, 2006 Share Posted June 12, 2006 It's been tested and it works to change it to ided anchors. Link to comment Share on other sites More sharing options...
scott100 Posted June 12, 2006 Share Posted June 12, 2006 It's been tested and it works to change it to ided anchors.<{POST_SNAPBACK}> 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 More sharing options...
snowboard01 Posted June 12, 2006 Share Posted June 12, 2006 kk I didn't really understand your post. Link to comment Share on other sites More sharing options...
The Praetorian Posted June 12, 2006 Share Posted June 12, 2006 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.) Link to comment Share on other sites More sharing options...
scott100 Posted June 12, 2006 Share Posted June 12, 2006 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.)<{POST_SNAPBACK}> 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now