Answers for "how to use html file in html"

8

how to start a html file

<!DOCTYPE html>
<html>
	<head>
		<title>Page Title</title>
	</head>
	<body>
      
	</body>
</html>
Posted by: Guest on June-11-2020
1

include html file in html file

// js
<script>
$(function () {
  var includes = $('[data-include]')
  $.each(includes, function () {
    var file = $(this).data('include')
    $(this).load(file)
  })
})
</script>
// html
<div data-include="header.html"></div>
<div data-include="footer.html"></div>
Posted by: Guest on December-27-2021

Code answers related to "how to use html file in html"

Browse Popular Code Answers by Language