The Benign Violation Theory
One theory of humor, and the one that I believe explains Internet humor the best, is the Benign Violation Theory, which claims that things are funny when "(1) a circumstance is appraised as a violation, (2) the circumstance is appraised as benign, and (3) both appraisals occur simultaneously" (McGraw, 75). Essentially, if you subvert expectations and be harmless, you can make people laugh. This theory explains the seemingly random memes that populate the internet, and explains why certain forms of comedy that were once acceptable have been receiving backlash from younger generations.
In regards to webdesign, the theory helps with establishing where to draw the line for when experimenting with design principals goes too far. For example, you can do unexpected things, but don't inconvenience your user. For example, the Captain Marvel website does the unexpected by having some very 90's superhero music start up once you interact with the site. However, that music can easily be turned off at the top of the page, which is smart, because nothing will kill a website's traffic faster than music that can't be turned off.