HTML5 is made out of 3 components: HTML, CSS and JavaScript. So we have to use all of them to take advantage of HTML5.
External HTML code can be included in another html document using javascript. The only thing is, you have to store external code in .js file. Here is an example how to include html paragraph:
<!DOCTYPE html>
<html>
<head>
<title>Main Page</title>
<script type="text/javascript" src="include_html.js"></script>
</head>
<body>
<script type="text/javascript">
paragraph();
</script>
</body>
</html>
Contents of include_html.js
function paragraph()
{
document.write("<p> This is an HTML paragraph </p>");
}