Features/Designer

HTML to elements import

Paste HTML and CSS and convert them into native Divhunt elements, classes and breakpoint styles.

The HTML to JSON tool takes HTML and optional CSS and converts it into Divhunt elements with classes and styles, so code from elsewhere becomes editable in the Designer.

How it works

  • Popup with HTML and CSS textareas and a Convert & Add button; also available as an element in the Embed group.
  • Skipped tags: br, hr, wbr, meta, link, script, style, noscript, template.
  • Mapped tags: strong to b; em, i, u, sub, sup, abbr, legend, output to span; main, dl, dt, dd, table parts, picture, dialog, details, fieldset, datalist, progress, meter to div; svg to embed.
  • CSS rules become classes; media queries snap to the closest existing breakpoint (default 1920).
  • @keyframes are kept by adding an embed with a style tag.

When to use it

  • Bring a section from a static HTML template
  • Convert a snippet from a UI library

Limitations

  • Tables and other unsupported tags lose their semantics (become div)
  • Scripts are dropped

Availability

  • Works in Designer.
  • Included in every plan.

How to use it.

  1. Select a parent element
  2. Add the HTML to JSON element or open the tool
  3. Paste HTML and CSS
  4. Click Convert & Add

Questions.

Are my CSS classes kept?

Related features.

No card needed

Build it today.Pay when it goes live.

Every feature is unmetered while you build. Checkout opens the first time you publish.