"For Each...items in a directory" actually has a "recursively" option (which I probably didn't realise last time!). Makes things a lot easier than anything I might have suggested...
In which case, we'll duplicate the target folder first so it'll be easy to go back to the originals! I've also limited the operation to files ending in ".html" so we don't try editing images or something -- you could change that, or add an "or .css" with another condition, etc. It currently works by asking you to pick the folder to process, but can be easily changed so that you select a folder in the Finder than trigger with a hotkey or palette button.
Roger S'n'R.kmmacros (6.7 KB)