使用w3.org解决iframe代码问题的问题

时间:2014-02-01 16:00:23

标签: html css html5

使用http://validator.w3.org/

整理我的代码

我收到了这些错误:

  

第143行,第102列:元素属性高度的错误值280px   iframe:预期数字,但看到p。   ... crea8tion.com / PP / usercapture / index.php“scrolling =”no“   高度= “280像素” >非负整数的语法:一个或多个数字   (0-9)。例如:42和0有效,但-273不是

-

  

错误行143,第102列:iframe上的滚动属性   元素已经过时了。请改用CSS。   ... crea8tion.com / PP / usercapture / index.php“scrolling =”no“   高度= “280像素” >


  

第282行,第90栏:&没有开始角色参考。 (安培;   可能应该被转义为&amp ;.)   ...任何/ 332992 TRK = vsrp_companies_res_name&安培; trkInfo = VSRPsearchId%3A2433719413894427 ...

从此代码中

<iframe src="http://crea8tion.com/PP/usercapture/index.php" scrolling="no" height="280px"></iframe>

我不确定如何解决这些问题?

1 个答案:

答案 0 :(得分:1)

见这里:http://www.w3.org/wiki/HTML/Elements/iframe

width = non-negative integer
Give the width of the visual content of the element, in CSS pixels.

height = non-negative integer
Give the height of the visual content of the element, in CSS pixels.

这意味着,宽度和高度的值总是以px为单位,你必须只插入一个整数。