That‘s probably because HTML doesn‘t actually has any logic. You basically just need to remember things and what to put where. You should try a programming language, which actually has logic and is therefore easier to understand (imo). The easiest language you can start with is probably python.
Safari on iOS supports extensions out of the box. You can just install adguard or something else and won‘t have any ads.
There are also third party browsers, which yes, use WebKit, but also can block ads.