Quite a difficult question about code borrowing. On the one hand, there are some standards by which modern browsers work, so you can't write anyhow. On the other hand, there are a large number of open-source libraries, the authors of which invite everyone to use their code. This is more "reuse" than "borrowing" in terms of plagiarism.
If we talk about direct borrowing like "Copy + Paste", then this can only be on small sites and with a short lifetime / development ... To quickly do something right now, to show something. Then in the code you can find exactly the same class names, the same variables, files.
Any large project focused on long-term development contains very few direct borrowings, because it is difficult and time-consuming to maintain a code that is conceived differently, every time you need to do something solid, this code will get in your way. The fact is that the code does not live in a vacuum by itself, but is associated with a bunch of other fragments, then such spontaneous bugs will pop up in the most unexpected places. Therefore, for any serious project, it is better to write code internally, and not try to pull on pieces and heap everything. It may work once, but it will cost much more to support.
By the way, there is a fear of remote developers on this topic when you ask them to do their test task - they say, now I will do a test task, and they will now take my code is free. As I said, for a large, serious project, this is meaningless. Here, reputation factors are added to purely economic factors.
Usually these are all sorts of scripts and modules (for example, jquery.js) and CSS styles from frameworks. In principle, icon libraries and plug-in fonts can also be considered "borrowed code". What is "written in solid text" is not necessarily "stuck" from somewhere, it is just a compressed form (allows you to save a certain amount of bytes when loading), or it can generally be, say, a description of an svg image embedded in the text pages, data from some google maps and in general, whatever. It's hard to say about the percentage of borrowed code in the "average site", because it's not clear how to count. Is the page added through the admin panel "original" or "borrowed" html? What about dynamically generated content?