html - Putting a heading on a table -
This is my code:
I am trying to put a title at the top of my table Which is spread all over the way, I thought it was the way to do it.
& lt; Table id = "my-table" & gt; & Lt; TR & gt; & Lt; Th & gt; Test & lt; / Th & gt; & Lt; Td> & Lt; Span class = "lrg" & gt; 10 & lt; / Span & gt; 1 & lt; / Td> & Lt; Td> & Lt; Span class = "lrg" & gt; 7 & lt; / Span & gt; 1 & lt; / Td> & Lt; Td> & Lt; Span class = "lrg" & gt; 3 & lt; / Span & gt; 1 & lt; / Td> & Lt; Td> & Lt; Span class = "lrg" & gt; 1 & lt; / Span & gt; 1 & lt; / Td> & Lt; / TR & gt; & Lt; / Table & gt;
What is the correct approach?
Try:
& lt; Table id = "my-table" & gt; & Lt; TR & gt; & Lt; Th colspan = "4" & gt; Test & lt; / Th & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; Td> & Lt; Span class = "lrg" & gt; 10 & lt; / Span & gt; 1 & lt; / Td> & Lt; Td> & Lt; Span class = "lrg" & gt; 7 & lt; / Span & gt; 1 & lt; / Td> & Lt; Td> & Lt; Span class = "lrg" & gt; 3 & lt; / Span & gt; 1 & lt; / Td> & Lt; Td> & Lt; Span class = "lrg" & gt; 1 & lt; / Span & gt; 1 & lt; / Td> & Lt; / TR & gt; & Lt; / Table & gt;
Comments
Post a Comment