<!DOCTYPE html>src="//libs.baidu.com/jquery/1.10.2/jquery.min.js"$(document).ready(function(){$("p").add(document.getElementsByTagName("span")[0]).css("background-color","yellow");});A p element.Another p element.A span element.A span element.This example adds the same css style for the first span element (index 0), as the existing p elements.