<ul class='my-class'>
<ul class='my-class second'>
  <li><a><em>Second <span>Second</span>  Second</em></a></li>
html {
  background: #fbdf00;
  font-size: 20px;
let items = document.querySelectorAll('.my-class a');
// loops through all the elements with the .my-class
for (let i = 0; i < items.length; i++) {
		// finds the children of the current .my-class
		let kids = items[i].children;
		for (let j = 0; j < kids.length; j++) {
      if (kids[j].tagName == 'SPAN') {
			      kids[j].style.color = 'blue';

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.