adds code to index.html