text changes to history and divided index into html css and js