Jump to content

Newbie questions


Nucklehed

Recommended Posts

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

Also, what does this tag do: <a name="sod">... </a>

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

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

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...