Reducing the HTML code to prevent duplicate IDs.