Warthog32
Programmer
- Mar 2, 2008
- 3
Hi,
I'm trying to re-write my website into XHTML with CSS, where previously it was quirks mode transitional HTML.
I'm just learning XHTML and ran across some examples that define custom tags, which are defined with CSS.
For example, I tried:
<TBL>
<ROW>
<CELL>
cell1
</CELL>
<CELL2>
cell2
</CELL2>
</ROW>
</TBL>
Where my CSS looks like:
TBL {
display: table;
}
ROW {
display: table-row;
}
CELL {
display: table-cell;
}
CELL2 {
display: table-cell;
}
This all seems to display correctly on browsers with XHTML support, and I love it since it makes the XHTML so concise and clean.
However, I can't get my page to validate (using the w3.org validator). It complains about each element with an error such as:
Error Line 41, Column 4: element "TBL" undefined.
Is there a way to properly "declare" these elements, other than doing so in the CSS? This all seems to work nicely, and so seems to be supported by the language, but is there something I'm missing?
Thanks!
I'm trying to re-write my website into XHTML with CSS, where previously it was quirks mode transitional HTML.
I'm just learning XHTML and ran across some examples that define custom tags, which are defined with CSS.
For example, I tried:
<TBL>
<ROW>
<CELL>
cell1
</CELL>
<CELL2>
cell2
</CELL2>
</ROW>
</TBL>
Where my CSS looks like:
TBL {
display: table;
}
ROW {
display: table-row;
}
CELL {
display: table-cell;
}
CELL2 {
display: table-cell;
}
This all seems to display correctly on browsers with XHTML support, and I love it since it makes the XHTML so concise and clean.
However, I can't get my page to validate (using the w3.org validator). It complains about each element with an error such as:
Error Line 41, Column 4: element "TBL" undefined.
Is there a way to properly "declare" these elements, other than doing so in the CSS? This all seems to work nicely, and so seems to be supported by the language, but is there something I'm missing?
Thanks!