Streaming live at 10am (PST)

Add an id to the body


#1

Hi,
I need to add the id=“home” at the body tag of the page;
then i need to add also onload="on()
Finally, the body tag of a page will be:
<body class="body" id="home" onload="on()">

In the exported webflow code i need exactly:
<body class="body" id="home" onload="on()">

It’s possibile to set the body tag in this way inside the webflow designer?

Thanks,


#2

You can set the id in the element settings panel.

As for the onload attribute, you have to attach an event listener via JavaScript instead.

e.g.:

<script>
document.addEventListener('load', on);
</script>