$("div").each(function() { $(this).text($(this).css("background-color")); }); <div style="background-color:Red"></div> <div style="background-color:Green"></div> <div style="background-color:Blue"></div>