This is a discussion on Correct anchor syntax for xhtml within the Coding Help forums, part of the Webmaster Help category; What is the compliant code, with regard to xhtml, for; 1)Internal page linking . 2.)Another page on the same server. ...
| |||||||
| Register | Forum Rules | FAQ | Donate | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| What is the compliant code, with regard to xhtml, for; 1)Internal page linking . 2.)Another page on the same server. 3) Open in a new window. Upfront, thanks for any definitive answer.
__________________ Arranmore Island |
| |||||
| I'm not totally sure what you want answered with the first to, but there goes: 1) To link internally in the page: Code: <a href="#anchor" title="Anchor Title">Link to anchor</a> Code: <a href="another_page.htm" title="Another Page">Another Page</a> Code: <a href="another_page.html" onclick="window.open(this.href); return false;" title="Another page new">Open in new window!</a> |
| |||||
| Quote:
1. It's faster to type (no shift key required) 2. It's doesn't require escaping in php (no backslash and shift key) From a quick search, it seems that it should be double quotes (source), but xhtml strict validates with single quotes on the w3c validator. |
| |||||
| I have always used double-quotes and I think we'd find that 95% of links to aswell. 1) I suppose but it is practically the same since you insert a double-quote with two different hands (I.E. It's still pratically one keystroke) 2) Well, if we want to get pedantic using single-quotes to escape PHP strings is faster for PHP to interpret and because double quotes are wider they are easier to see in the string. That's my view anyway. As for quoting attributes both single and double are valid, with similar quoting rules (Singles ok in double, double ok in single) |
| |||||
| yes, you can use Code: <a href="page.php" target="_blank" title="you page">Link</a>
__________________ :. Web Design & Development Web Design Ireland :. Search Engines Optimization Search Engines Optimization :. Directory Submission Directory Submission :. News & Press Release Ireland GiveItSocks.com :. Used Cars Ireland, Car Parts & Car Audio Cars For Sale, Car Parts & Accessories :. I Have 2 Find It Directory SEF Directory |
| |||||
| I'm not sure why he asked about XHTML in the first place if he wanted the old HTML answer.. |
| |||||
| beats me. |
| ||||
| As David said, target="_blank" is not xhtml (although it is xhtml transitional), here is another idea, and it is xhtml strict compliant. It also uses javascript though... Weblog Tools Collection » Blog Archive » target=”_blank” XHTML 1.0 Strict Conversion
__________________ Startpage Ireland | PDA Startpage Ireland | Proxy List | Irish Websites | Advertise Ireland Last edited by SlitheryImp; 20-04-2007 at 07:13 PM. |