The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> External html in js, how to add a header to all html pages in js
falcon
post 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
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
CharlesEF
post 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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 25th April 2024 - 01:58 PM