You can just use the tidyverse stringr package for this.
# read_html("path to your file")
# str_replace_all(string, pattern, replacement)
# write_html(x, "path to your file")
library("tidyverse")
path <- "/Users/Enno/Documents/htmlfile.html"
file <- read_html(path)
file <- str_replace_all(file, "name", "Names")
write_html(file, path)