Charlie Epps
Charlie Epps

Reputation: 3675

why my hyperlink tags display as plain text on the browser?

In a table structure, I add a hyperlink like this:

<table>
    <tr>
        <a href='http://www.google.com'>link</a>
    </tr>
</table>

But it display as plain text on the browser(IE or firefox) like this:

<a href='www.google.com'>link</a>

not a link point.

who can tell me the reason? thankx.

Upvotes: 0

Views: 2432

Answers (3)

Rob Kent
Rob Kent

Reputation: 5193

You are missing the TD element so the HTML is invalid. Pass your HTML through the HTML Validator.

Upvotes: 0

treaschf
treaschf

Reputation: 5944

Try it like this:

<table>    
    <tr>        
        <td>
            <a href="http://www.google.com">link</a>
        </td>
    </tr>
</table>

Upvotes: 1

Jason Aller
Jason Aller

Reputation: 3652

Two items. As treaschf noted you need to use double quotes, and for any link leaving your site you need to preface it with http://

<table>    
    <tr>        
        <td>
            <a href="http://www.google.com">link</a>
        </td>
    </tr>
</table>

Upvotes: 3

Related Questions