2012-11-21 6 views
0

테이블 태그 안에 있지만 셀 외부에 요소가있는 것은 나쁜 관행입니까? 예컨대테이블 안쪽에 있지만 td 바깥 쪽

:

<table> 
    <tbody> 
     <td>Hello,</td> 
     <td>Help me I'm a table cell.</td> 
     <td>I'm just happy to be here.</td> 
    </tbody> 
    <a>close button</a> 
</table> 
+3

예, 올바른 마크 업이 아닙니다. 자기 아들을 확인하십시오. –

답변

1

유효한 HTML http://validator.w3.org/check을 확인하려면이 항목을 사용하십시오. 그것은 다음과 같은 오류가 표시됩니다 : a 요소는이 표 요소 내부처럼 허용되지 않는 상황에서 찾을 수 없기 때문에

The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed). 

One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error). 
+0

많은 감사합니다. 친구. –

2

네는 외부 또는 테이블 셀 안에 넣어.

0

예. 안에 직접 <a>을 사용할 수 없습니다. 세포 (<td> 또는 <th>) 또는 테이블 바깥에 넣으십시오. <caption>을 사용할 수도 있습니다.

0

네, 유효성 검사 오류를 제공합니다.

관련 문제