Reply
linking a page from another page
Old 10-06-2008, 04:02 AM linking a page from another page
Junior Talker

Posts: 1
i have written a program as below
Code:
<html>
<head>
<title>
hello everybody
</title>
</head>
<body>

<a href "http://localhost/cgi-bin/test.html"> <h1 align = "center">test </h1></a>
</body>
</html>
test.html is as below

Code:
<html>
<head>
<title>
hi hello
</title>
</head>
<body>
hi how are you
</body>
</html>
the main html program is not making a link to the file which is given as the href...
so please tell me where i have done mistake... how can i solve it?
vapanchamukhi is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 10-06-2008, 04:10 AM Re: linking a page from another page
chrishirst's Avatar
Super Moderator

Latest Blog Post:
Am I impressed or what?
Posts: 14,864
Location: Blackpool. UK
a hn tag should NEVER go inside an <a> element


and it's href="address"
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 10-06-2008, 11:44 AM Re: linking a page from another page
Experienced Talker

Posts: 32
Quote:
Originally Posted by chrishirst View Post
a hn tag should NEVER go inside an <a> element
Place the <a> tag instead inside the <h1> tag
arbet is offline
Reply With Quote
View Public Profile Visit arbet's homepage!
 
Old 10-06-2008, 10:35 PM Re: linking a page from another page
Decaf's Avatar
Experienced Talker

Posts: 35
Name: Adam
Quote:
Originally Posted by arbet View Post
Place the <a> tag instead inside the <h1> tag
or
Code:
<a href="http://google.com" style="font-size:x-large;color:#000000;">Google</a>
This is more complaint and you can change the "x-large" to "large" or "xx-large".
__________________
My Site
Decaf is online now
Reply With Quote
View Public Profile Visit Decaf's homepage!
 
Old 10-07-2008, 02:45 AM Re: linking a page from another page
Experienced Talker

Posts: 32
Quote:
Originally Posted by Decaf View Post
or
Code:
<a href="http://google.com" style="font-size:x-large;color:#000000;">Google</a>
This is more complaint and you can change the "x-large" to "large" or "xx-large".
Why it is more compliant? Both are valid XHTML.
arbet is offline
Reply With Quote
View Public Profile Visit arbet's homepage!
 
Old 10-07-2008, 04:22 AM Re: linking a page from another page
chrishirst's Avatar
Super Moderator

Latest Blog Post:
Am I impressed or what?
Posts: 14,864
Location: Blackpool. UK
A heading element inside a anchor element is NOT valid (X)HTML

inline elements must NOT enclose block elements
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 10-07-2008, 07:49 AM Re: linking a page from another page
hirewriters's Avatar
Average Talker

Posts: 15
I agree H1 is a block level element and a (anchor) is an inline element so you need to open the h1 tag first and then place anchor tag inside it.
In your code (the first post) you have missed "=" after "a href"
__________________
Let freelance writers bid on your content requirements at HireContentWriters.com
hirewriters is offline
Reply With Quote
View Public Profile Visit hirewriters's homepage!
 
Old 10-07-2008, 09:33 AM Re: linking a page from another page
sweetkendi's Avatar
Novice Talker

Posts: 6
try this code:

Code:
<h1 align="center"><a href="http://localhost/cgi-bin/test.html">Test</a></h1>
I hope this will help you..

Last edited by sweetkendi : 10-07-2008 at 09:35 AM.
sweetkendi is offline
Reply With Quote
View Public Profile
 
Old 10-07-2008, 10:14 AM Re: linking a page from another page
LadynRed's Avatar
Super Moderator

Posts: 6,699
Location: Tennessee
If we're talking XHTML here - align="center" is not valid either - that kind of presentational markup belongs in a CSS file, and that alignment method is DEPRECATED.

Using font sizes like large, x-large, etc. is just asking for trouble. Font sizing should be done in percentages or em's.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
"Using or working with IE is like having to wear a 1970's polyester suit with pantyhose and a girdle, to work everyday"
Carolina Corvette Club
LadynRed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to linking a page from another page
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.13949 seconds with 12 queries