本文介绍了创建一个具有target =“_blank”的W3C验证锚链接。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下HTML片段,当点击时创建一个新窗口:

I have the following piece of HTML that creates a new window when clicked:

<a href="/path/to/site" target="_blank">glide by the people</a>

问题是它没有通过W3C验证器。

Problem is that it does not pass the W3C validator. How do I create a link like the above that does validate?

推荐答案

使用此文件类型:

<!DOCTYPE html PUBLIC "-//w3c//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhmtl1/DTD/xhmtl1-transitional.dtd">

1.0过渡包含一些htmllegacy代码,包括target =_ blank。

1.0 transitional accommodates some html "legacy" code, including target="_blank".

这篇关于创建一个具有target =“_blank”的W3C验证锚链接。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-12 05:57