Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How well-supported is <base>? Should I be using it?

Tags:

html

So I just found out today that you can use <base href=""/> to specify the base URL for relative URLs. It seems so awesomely convenient, and I'm surprised why it's not mentioned more often. Is there any reason to not use it? It's not anything new, right?

like image 810
munchybunch Avatar asked Dec 01 '10 16:12

munchybunch


1 Answers

It's part of the HTML 4.01 specification (and also the latest draft of the HTML 5 spec). You're good to go.

From section 12.4 of the HTML 4.01 spec:

This attribute specifies an absolute URI that acts as the base URI for resolving relative URIs.

like image 183
Donut Avatar answered Nov 15 '22 08:11

Donut