I had the exact same question if you are using doubleclick as your ad server here is the answer
Standard HTML5 display ads are made up of an HTML file and a file of images. The 40K weight limit should be measured by adding together the sizes of the HTML file and image file.
HTML5 Rich Media creatives include polite loading by default. This means the initial load size of the creative includes only the main .html document (which works sort of like a parent .swf file that loads all of the assets). The enabler and external .js libraries/style-sheets are considered subsequent load and are not included within QA test script.
That's great, thanks for your help!