Dom how to save the value

hi all, i new to DOM and need some help regarding some scripts.

if i use a dom to change one of the texts “hello world” to “hello kitty” inside the html, is it possible to save the html? as after i close the html, the hmtl will still show the old value “hello world”.