I need to strike out the entire table row using <strike></strike>
HTML tags. I applied the <strike>
around the table row , but it didn't work. Please suggest how I can achieve this.
Other options I tried as shown below using CSS line-through. This works, but the accessibility technologies, won't recognize the line through I believe. So other answers answered in this forum for this question won't work in this case.
<tr style="text-decoration: line-through; color:red; width:100%">
I've attached the sample code. I want the row 2 to be stricken out. Any way to achieve this?
<!DOCTYPE html>
<html>
<head>
<table style="border: 1px solid black;width:100%">
<thead>
<tr>
<th>Table 1 Head 1</th>
<th>Table 1 Head 2</th>
<th>Table 1 Head 3</th>
<th>Table 1 Head 4</th>
</tr>
</thead>
<tr>
<td>Row 1 Column 1</td>
<td>Row 1 Column 2</td>
<td>Row 1 Column 3</td>
<td>Row 1 Column 4</td>
</tr>
<strike>
<tr>
<td>Row 2 Column 1</td>
<td>Row 2 Column 2</td>
<td>Row 2 Column 3
</td>
<td>Row 2 Column 4</td>
</tr>
</strike>
<tr>
<td>Row 3 Column 1</td>
<td>Row 3 Column 2</td>
<td>Row 3 Column 3</td>
<td>Row 3 Column 4</td>
</tr>
</table>
</body>
</html>
tag. My data is in xml format, and I use xsl to transform and render the html content. The entire row is stored inside a processing instructions data content. So Whenever there is particular type of processing instruction element in the xml, that means, that row needs to be striked out indicating its been deleted. IN my case the entire tr.– KV MC Aug 24 '23 at 18:32,– slugolicious Aug 25 '23 at 05:12, orand put it on a or will **not** help the screen reader user. While those elements have semantics, no screen readers do anything with them so the user won't know it's struck out. You'll need to provide [`sr-only`](https://stackoverflow.com/questions/19758598/what-is-sr-only-in-bootstrap-3) type text to communicate the meaning of your struck-through text.