Zo Has
Zo Has

Reputation: 13018

How to include '<' as text between html tags?

How can I achieve something simple as this in HTML ?

<a href="#"><< Back to Main Page</a>

Upvotes: 4

Views: 4041

Answers (7)

Suleman Ahmad
Suleman Ahmad

Reputation: 2103

You can use it.

<a href="#"> &#60&#60 Back to Main Page</a>

Upvotes: 1

heikkim
heikkim

Reputation: 2975

Use an entity: &lt;. Others used often for similar cases is &laquo; («).

Upvotes: 2

Selvakumar Ponnusamy
Selvakumar Ponnusamy

Reputation: 5533

use HTML encode chars &gt; &lt;

Upvotes: 3

Interrobang
Interrobang

Reputation: 17434

The double chevron is called &laquo; for left and &raquo; for right.

<a href="#">&laquo; Back to Main Page</a>

Upvotes: 3

Petar Ivanov
Petar Ivanov

Reputation: 93020

You need to HTML encode it:

<a href="#">&lt;&lt; Back to Main Page</a>

Upvotes: 6

Michel
Michel

Reputation: 9440

http://htmlhelp.com/reference/html40/entities/special.html

SO: &lt;

-->

<a href="#">&lt;&lt; Bla Bla</a>

Upvotes: 4

Royi Namir
Royi Namir

Reputation: 148524

<a href="#">&lt;&lt; Back to Main Page</a>

Upvotes: 4

Related Questions