I seem to remember coming across a UX rule several years ago referring to the max number of font styles that should be used on a webpage. Can anyone here who is more involved with UX provide some insight on this? Is the general rule max of 3 where a style is defined as any variation/combination of font attributes such as size (12, 14, 16, etc), family (arial, etc), weight, etc?
My recommendation is to use a maximum of 3:
1. You should aim for consistency, and by adding too many font styles you risk breaking the rule of unity in design.
2. Performance considerations. By adding too many fonts you can increase the weight of your site dramatically and it will slow down the website.
There are situations and projects that can benefit from many fonts. I once designed a poster for a concert in my city and ended up using 10 different fonts for it. Almost every word was a different font :). Also, it was just a poster not a website.
Here are some links for further reading:
Learned not to put more than 2 fonts on any single PAGE in school (2015ish), however I regularly notice multiple font styles on a single page in other people's work. As a rule of thumb I use two fonts consistently on a site and will add one addition font to stylize as necessary on a single page. But remember that these style choices are meant to enhance your page. Your fontt should not be distracting to an average reader and it should not cause your site to look chaotic or disorganized. As long as you feel that you're enhancing and not taking away from your work do whatever you like.
As far attributes like font size, I use size to help organize the page and that is achieved by consistencey throughout your site. Sticking to a family is a little different because different browsers are going to handle your code differently. So you may include a specific font but it could get pushed to the most similar style or the default of its family by the browser anyway. The best way to avoid this is to test in many environments. But again, these choices boil down to preference.