I'm currently faced with an HTML file that's being generated by an outdated system, making it tricky for me to control the code generation process.
The structure of the HTML code is as follows:
<table cellpadding=10>
<tr>
<th>Col 1</th>
<th>Col 2</th>
<th>Col 3</th>
</tr>
<tr>
<td>Name: XYZ</td>
<td>Lorem Ipsum Description</td>
<td>More Lorem Ipsum</td>
</tr>
<tr>
<td>Name: XYZ</td>
<td>Lorem Ipsum Description</td>
<td>More Lorem Ipsum</td>
</tr>
<tr>
<td>Name: 123</td>
<td>Lorem Ipsum Description</td>
<td>More Lorem Ipsum</td>
</tr>
<tr>
<td>Name: XYZ</td>
<td>Lorem Ipsum Description</td>
<td>More Lorem Ipsum</td>
</tr>
<tr>
<td>Name: XYZ</td>
<td>Lorem Ipsum Description</td>
<td>More Lorem Ipsum</td>
</tr>
</table>
This table consists of 1 row for the Table Header and then 4 rows of data.
There's a unique text Name: 123
in the first cell of the third data row.
To resolve this issue, I aim to hide/remove the specific row containing Name: 123
.
My attempts at using CSS have been unsuccessful so far since there isn't a selector that targets elements based on a particular String
.
What would be the best approach to hiding/removing the row with Name: 123
? I'm open to utilizing either CSS or JS if necessary.