Get started with h3-js CDN

Apache-2.0 licensed

H3.js is a library for adding hierarchical headings to HTML documents.

Tags:
  • h3
  • hexagon
  • spatial-indexing
  • emscripten
  • geolocation

Stable version

Copied!

How to start using h3-js CDN


<!DOCTYPE html>
<html>
<head>
  <title>Get started with h3-js CDN - cdnhub.io</title>
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/h3-js/4.1.0/h3.css">
  <script src="https://cdn.cdnhub.io/h3-js/4.1.0/h3-js.js"></script>
</head>
<body>
  <header id="header">
    <h1>Welcome to my website</h1>
    <nav>
      <ul>
        <li><a href="#about">About</a></li>
        <li><a href="#services">Services</a></li>
        <li><a href="#contact">Contact</a></li>
      </ul>
    </nav>
  </header>
  <main>
    <h2 id="about">About</h2>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed euismod, nisi quis bibendum rhoncus, elit quam hendrerit magna, nec luctus tellus mauris a odio.</p>

    <h2 id="services">Services</h2>
    <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec lacinia nunc vel est. Nullam id felis et ipsum bibendum ultrices.</p>

    <h2 id="contact">Contact</h2>
    <p>Suspendisse potenti. Nullam quis ante. Etiam sit amet orci eget ipsum lacinia bystrocentricum nec ut mauris. Nam eleifend, mi at bibendum laoreet, mi velit bibendum arcu, vel bibendum nisl tortor et nulla.</p>
  </main>

  <script>
    new H3(document.querySelector('header h1'), {
      textTransform: 'uppercase',
      title: 'My Website'
    });

    new H3.Nav(document.querySelector('header nav ul'), {
      activClass: 'active'
    });
  </script>
</body>
</html>
Copied!
Copied!
Copied!
Copied!

All versions