Is a non-protocol link valid XHTML? those.

Do XHTML / good practices have links of the following form? //www.example.com/foo/bar.html

If the current page is HTTP, the link points to: http://www.example.com/foo/bar.html If the current page is protected under HTTPS, the link points to: https://www.example.com/foo/bar. html

In other words,

<a href = "//www.example.com/">

valid in XHTML 1.1 Strictly ? And is this supported by many / all browsers?

+7
source share
1 answer

Is XHTML Really

Completely. XHTML does not care about URI syntax. The href attribute is defined as containing CDATA.

valid in XHTML 1.1 Strictly?

There is no such language.

XHTML 1.0 has Strict / Transitional / Frameset versions.

XHTML 1.1 is just XHTML 1.1. (And not blessed by rfc2854 for use as text / html (which you need to support IE <9).

And is this supported by many / all browsers?

Yes. Support is ok.

+8
source

All Articles