External html in js, how to add a header to all html pages in js |
External html in js, how to add a header to all html pages in js |
falcon |
May 6 2020, 02:16 PM
Post
#1
|
Newbie Group: Members Posts: 17 Joined: 30-August 14 Member No.: 21,482 |
1. Put tthis in your page
<script src="htttps://.w3schools.com/lib/w3.js"></script> 2. Then where ever you want your html code, from the separate file, to be included to your page: <div w3-include-html="header.html"></div> template: CODE <!doctype> <html> <head> <meta http-equiv="content-type. . . <meta http-equiv="content-Language. . . <meta name=. . . <title>. . . <link ref="STYLESHEET. . . <style type=". . . </style> <s cript src="https://w3schools.com/lib/w3.js"></script> </head> <body> <dl> <dt><b><a name=". . . <div w3-include-html="header.html"></div> <script>w3.includeHTML();</script> this did not work for me. any suggestions Thank you falcon |
CharlesEF |
May 6 2020, 04:52 PM
Post
#2
|
Programming Fanatic Group: Members Posts: 1,981 Joined: 27-April 13 From: Edinburg, Texas Member No.: 19,088 |
script is spelled wrong. You have a space between s and c.
|
Lo-Fi Version | Time is now: 25th April 2024 - 01:58 PM |