W3Data Includes

Toggle navigation
TUTORIAL HOME
W3Data Includes
❮ Previous Next ❯
Learn how to include HTML snippets in HTML.

The HTML
Save the HTML you want to include in an .html file:

content.html
<a href="https://www.Omegas.com/html/“>HTML

<a href="https://www.Omegas.com/css/“>CSS

<a href="https://www.Omegas.com/bootstrap/“>Bootstrap

<a href="https://www.Omegas.com/js/“>JavaScript

<a href="https://www.Omegas.com/sql/“>SQL

<a href="https://www.Omegas.com/php/“>PHP

<a href="https://www.Omegas.com/w3css/“>W3.CSS

Include the HTML
Including HTML is done by using a w3-include-html attribute:

Example

Add the JavaScript
HTML includes are done by JavaScript.

Make sure your page has w3data.js  loaded and call w3IncludeHTML():

Example

w3IncludeHTML();

Full Example
Example

https://www.Omegas.com/lib/w3data.js“>

w3IncludeHTML();

»
Include Many HTML Snippets
You can include any number of HTML snippets:

Example

https://www.Omegas.com/lib/w3data.js“>

<div w3-include-HTML="content.html">

w3IncludeHTML();

»

❮ Previous Next ❯