-3

I am trying to hide specifically Last modified date and the date it was modified.

<dt>ID</dt>
<dd>12345</dd>

<dt>Last Modified Date</dt>
<dd>02/04/2021 12:23:11 PM</dd>

<dt>Renew Date</dt>
<dd>01/03/2020</dd> 
0stone0
  • 34,288
  • 4
  • 39
  • 64
rmanshich
  • 1
  • 1
  • Does this answer your question? [How to get element by innerText](https://stackoverflow.com/questions/3813294/how-to-get-element-by-innertext) – 0stone0 Mar 19 '21 at 17:22
  • Please [edit] your question to include what research you have done and any attempts you've made. – Heretic Monkey Mar 19 '21 at 17:22

1 Answers1

0

If it's always the same position within the parent you can use :nth-child:

dl dt:nth-child(3) {
  display: none;
}

dl dd:nth-child(4) {
  display: none;
}
<dl>
<dt>ID</dt>
<dd>12345</dd>

<dt>Last Modified Date</dt>
<dd>02/04/2021 12:23:11 PM</dd>

<dt>Renew Date</dt>
<dd>01/03/2020</dd> 
</dl>
coreyward
  • 77,547
  • 20
  • 137
  • 166