Nucklehed Posted November 9, 2005 Share Posted November 9, 2005 I'm reading a book a friend gave to me called Beginner XHTML by wrox.I'm trying to get a grip on a few things:What's an <isindex> ?Also, what does this tag do: <a name="sod">... </a> Link to comment Share on other sites More sharing options...
Jerome Posted November 9, 2005 Share Posted November 9, 2005 I was curious to know what <isindex> was, here is the answer : <ISINDEX ...> is the old way to make an online form. The purpose of <ISINDEX ...> has been entirely fulfilled and greatly expanded by regular forms...You can find more here, but you should better use the form tag rather than the isIndex...Why don't you try to put the second tag your are asking for into an html document just to see the result?anchor.html<html><head><title>Anchor</title></head><body><a href="http://w3schools.invisionzone.com">w3schools</a></body></html> Link to comment Share on other sites More sharing options...
Atom-G Posted November 9, 2005 Share Posted November 9, 2005 Also, what does this tag do: <a name="sod">... </a><{POST_SNAPBACK}> You can put this tag to make a reference in your web page. For example, if you put somewhere in your page (named index.html for this example here) <a name="test">Access</a> and somewhere else you put <a href=./index.html#test>Click Here</a>, than Click Here will become a link and by clicking on it the page will center on the word "Access".Here is a sample code that you can try:<html><head><title>test</title></head><body><a href="./index.html#test">click here</a><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><a name="test">test</a>You have been redirected here.<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></body></html> Link to comment Share on other sites More sharing options...
Nucklehed Posted November 9, 2005 Author Share Posted November 9, 2005 I gotcha now. Thanks, guys. Link to comment Share on other sites More sharing options...
F-Man Posted November 9, 2005 Share Posted November 9, 2005 No inline elements directly into the body, guys. Also: CSS margins, not line breaks. Link to comment Share on other sites More sharing options...
Nucklehed Posted November 9, 2005 Author Share Posted November 9, 2005 Yeah, that's got like 40 empty line break tags in there...Wanna post it with moch CSS margins so I can see?What's the inline element and why does it need to stay in the head? Link to comment Share on other sites More sharing options...
F-Man Posted November 9, 2005 Share Posted November 9, 2005 No, inline elements also go in the body, but inside block-level elements.Inline elements (like <a/>) are elements that fit inside a line of text. A block-level elements is one that contains a line break before and after it, like <p/> or <div/>.So here would be a correct way: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><title>test</title></head><body><p><a href="#target">click here</a></p><p id="target">You have been redirected here.</p></body></html> Then this in your CSS #target { margin-top: 40em;} Though you usually don't need to use margins. If you use internal links, that should be because there's a lot of text between the source link and its target, not because of a useless margin. :)Also, the name attribute is deprecated in XHTML (except for form elements, <meta/> and <param/>), you should use id instead.And as you could see, using <a> for the target of an internal link is useless. You can apply an id to any element, like to the paragraph I did in my example. Link to comment Share on other sites More sharing options...
Atom-G Posted November 9, 2005 Share Posted November 9, 2005 ok.... it was just a fast example to easily show the redirect thing. You can copy the code in a html file and in no time understand the way a name works. 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