JSFiddle - React, Tailwind, and code Playground

HTML

<li data-tags = "Images"></li>

JavaScript

var li = document.getElementsByTagName("li")[0],
    dataTags = li.getAttribute("data-tags"),
    a = document.createElement("a"),
    img = document.createElement("img");

if (dataTags == "Images"){
    a.href = "http://www.google.com";
    a.className = "thumb fsand";
    img.src = "http://goo.gl/Awtctv";
    li.appendChild(a);
    li.appendChild(img);
}
else{
    a.href = "http://www.yahoo.com";
    a.className = "thumb play";
    img.src = "http://goo.gl/jrCWiS";
    li.appendChild(a);
    li.appendChild(img);
}