HTML5 is not a video format. HTML5 is a format for creating web pages. If you want to create a video that plays in an HTML5 web page, then determine what video player you'd like to use and then decide what format to export your video to based on what formats that video player plays.
A common choice is to use the H.264 in an .mp4 container file, which plays in many video players. You create such files through Adobe Media Encoder.
Thanks for your answer, but how to export into H.264 in MP4 format since I can only select MOV format.... please advise.
I was trying to create some animated logo and use it for website, I export the my file into .MOV but the file size was super large (1180x512pix, 24 films/sc, file size: 452.3MB) how do I compress the file be able to use it for website?
You can either render a lossless, intermediate file from After Effects and then use that in the Adobe Media Encoder to create your final deliverable OR you can import your AE composition directly in the Adobe Media Encoder and render your deliverable without the intermediate step.
There are pros and cons to both workflows, but either way you will be using the Adobe Media Encoder to create the H.264.