Href without http(s) prefix

后端 未结 4 1648
死守一世寂寞
死守一世寂寞 2020-12-29 21:22

I just have created primitive html page. Here it is: example And here is its markup:

www.google.com

&l
4条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-29 22:07

    You can omit the protocol by using // in front of the path. Here is an example:

    Google
    

    By using //, you can tell the browser that this is actually a new (full) link, and not a relative one (relative to your current link).

提交回复
热议问题