html5 - Include HTML into other HTML with web components -


what right way insert html snippet main html file html5 imports?

the answer more generic question https://stackoverflow.com/a/22142111/239247 mentions possible do:

<head>   <link rel="import" href="header.html"> </head> 

but doesn't work. don't need insert js , css. plain html markup inserted @ top of <body>. simple way , keep html readable?

the way have found use asp.net , .cshtml files , use razor, seen here: http://weblogs.asp.net/scottgu/asp-net-mvc-3-layouts beyond inserting html other html allows have consistent navigation bars, footers, etc. , minimizes code profile. also, use of layout file gives site better feel section of site refreshes when click internal link, opposed whole site.


Comments