Re: Do we need the restrictions on the <base> element?

I agree with Henrik Dvergsdal and have long wished the HTML 
specification would address this need, as discussed in my Stack Overflow 
question:

https://stackoverflow.com/questions/69594852/is-there-an-html-attribute-dedicated-to-setting-the-base-url-for-all-descendants

The ideal solution would be an HTML attribute that sets a base URL for 
an element and all its descendants, with the ability to override it in 
child elements. This would dramatically reduce verbosity when pages 
contain multiple lists of hyperlinks, each with different (and often 
very long) base URLs.

While JavaScript can solve this problem, it's surprising that the HTML 
specification restricts pages to a single `<base>` element, forcing 
developers to repeat lengthy URLs or resort to scripting for what should 
be a fundamental markup feature.

-- 
Lonnie Best
281-529-5879

Received on Wednesday, 18 June 2025 08:47:27 UTC