PDFs don't solve link rot. But in HTML, it's conventional to rely on links for stylesheets and sometimes even content (images, asynchronous DOM elements), so link rot is a bigger problem.
Yeah for publishing you don't want content in links, but you can solve that with data URIs that embed images and other data directly into the link [1].
[1]:https://en.m.wikipedia.org/wiki/Data_URI_scheme