Hello. I just created an HTML table and got it looking just like I wanted, and then decided that I want to have a red arrow pointing to a particular row for emphasis.
In order to keep the arrow aligned with the rest of the row data, I decided to create a new empty column and add the Unicode for this arrow there.
However, i am unsure if my “hack” will break proper HTML semantics?
Hi,
The validator throws the following error in regards to the scope on the td
The scope attribute on the td element is obsolete. Use the scope attribute on a th element instead.
It does not give an error in regards to a td preceding a th. Also, MDN td specs gives this info.
Tag omission
The start tag is mandatory.
The end tag may be omitted, if it is immediately followed by a <th> or <td> element or if there are no more data in its parent element.
I read that to say that it could be possible for a th to follow a td.
Semantically speaking though I would expect all td elements to follow a th.
Is there some reason you can’t slip your unicode in the th before the heading text, and move the scope=“row” to the th
Yes, I thought about your suggestion, however I want the red arrow to appear to be outside of the visible table and pointing to the right, sort of like a “Hey, look at this row!!”