I have a page that might one of the following:
33
Or
<
You can't do it with a regular CSS selector, but you can do it in a few lines of JS:
var element = document.querySelector('#size'); var b = element.querySelector('b'); var text = b ? b.innerText : element.childNodes[0].nodeValue; console.log(text);