In HTML, a table header cell (<th>) can be given a scope attribute to identify whether it is associated with the ensuing column or row or group of them. Is it possible to use a CSS selector to style all table cells (<td>) that are associated with the header cell? I.E., style the entire row if scope="row" or column if scope="column"?
Presupposing the answer is probably "no": then what purpose does the scope attribute serve (other than the CSS [attribute=value] selector)? Does the browser use it for accessibility options? Or should I ignore it as a developer?
.tableClass th[scope=col] {
styleme: beautiful;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With