Hi
I am optimising pages with WebPosition and it does not recognise text in <h4> tags which has font tags and A tags like this :-
<H4><a href="http://www.privatetoursuk.com"><font face="georgia" size="2" >british royal family tours </font></a></H4>
So I altered the position of the <H4> tags to either side of the text like this :-
<a href="http://www.privatetoursuk.com"><font face="georgia" size="2" ><H4>british royal family tours</H4></font></a>
Web Position now accepts this, but the HTML validator says that the <h4> tags should not be inside the A tags and font tags.
Please can you tell me how to write this code correctly. ie where should <H4> tags go ?
Regards Hazel
nesting tags
-
- Rank II - Novice
- Posts: 46
- Joined: Sun Oct 01, 2006 2:18 pm
- Location: CA
See if WebPosition works with this:
<h4><a href="http://www.privatetoursuk.com">british royal family tours</a></h4>
That's the way it should be coded, and if WebPosition can work with that then you'll know the font tags are the problem. You will then need to use CSS instead of the font tags if you want the code to both work with WebPosition and validate.
<h4><a href="http://www.privatetoursuk.com">british royal family tours</a></h4>
That's the way it should be coded, and if WebPosition can work with that then you'll know the font tags are the problem. You will then need to use CSS instead of the font tags if you want the code to both work with WebPosition and validate.
-
- Site Admin
- Posts: 3785
- Joined: Sat Dec 11, 2004 9:23 am
- Location: Near Dallas, TX
I would try what CaryD suggests. I am not familiar with WebPosition, but if it is not wanting you to write good HTML, then I wouldn't use it.
You could use something like that as well (I added the CSS to what CaryD suggested):
You could use something like that as well (I added the CSS to what CaryD suggested):
Code: Select all
<h4 style="font-family:georgia,sans-serif"><a href="http://www.privatetoursuk.com">british royal family tours</a></h4>
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
-
- Site Admin
- Posts: 3785
- Joined: Sat Dec 11, 2004 9:23 am
- Location: Near Dallas, TX
In case anyone is interested, hazelpat told me that it was the "font" tag that was the problem.
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
-
- Rank II - Novice
- Posts: 46
- Joined: Sun Oct 01, 2006 2:18 pm
- Location: CA
-
- Rank 0 - Newcomer
- Posts: 6
- Joined: Sat Aug 25, 2012 8:06 am
Re: nesting tags
As you are saying that web position is not accepting the line "<H4><a href="http://www.privatetoursuk.com"><font face="georgia" size="2" >british royal family tours </font></a></H4>",but this is the general format and it is correct format to write the code you are not supposed to write the<h4> tag in midst of the link as it gives the error message while validation, so i would like to suggest you to use css which gives better comfort.