Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

puting <a> in the <header> tag

Status
Not open for further replies.
the head is no place for actual displayed content, you put that in the body! (well except document title!)

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
When you say the code works, what did you mean? I have never seen an user agent that would display head element, so I don't know how your code would "work", without you being able to see it.
 
I have never seen an user agent that would display head element
You've never seen Firefox? or IE? This "works" in both of them (and in other browsers too I expect):
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[/URL]
<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml"[/URL] xml:lang="en">
<head>
<title>Don't Try This at Home!</title>
<a href="#">Hello World!</a>
</head>
<body>
<p>Did you see that?</p>
</body>
</html>
It's definitely not recommended though. Why would you even want to try it?

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
Oops. Actually, FF says that default CSS for <head> is display: none; so I assumed that nothing in there would show. I guess I should be more adventurous with my coding.
 
I put a table in a table in a table once
scandalous behaviour!

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top