update html elements by mapping query selectors to attributes, text, and hypertext