You want the ratio of number 1 as low as you can get, meaning as little HTML, CSS and JavaScript in the HTML file as possible, and as much readable text as you need. You want number 2 to be a fairly low ratio, but not too low. Some search engines, like Google, will penalize you if you spam your pages with keywords. So you want a good balance of keywords and other body text.
Use only as much HTML, CSS and JavaScript in the HTML file as is necessary for the design and functionality. Write only as much about a topic as you need to get the point across to a human reader. Do not resort to simply listing keywords on the page. That will insite the wrath of the spam filters on some search engines.
To sum it up, use a table-free layout utilizing CSS for design, keep your JS in separate files, and be a clear and concise writer. Probably most importantly, be a clear and concise writer.