Questions about Webflow and HTML5 tags/settings tab

So I’ve been busy refactoring my current webflow site and have some questions about how webflow uses html5 tags.

  1. When I select and create a section from the layout pane, it’s listed as a “div” in the settings tab. If I select the “section” tag, leave the page and return, the “section” option has reverted back to a “div” tag. Is this because you’d be calling a “section” tag on a pre-defined section?

  2. The same thing happens when I call a “section” tag on a div block. I leave the page and return and the “section” option has reverted back to a “div” tag. Not sure why this happens.

  3. Which is more correct/semantic - changing a styled div to be a “section” or “aside” tag (depending on my layout), or wrapping/nesting the styled div in a new section from the layout pane?

  4. On export, does Webflow add a HTML5 shiv/shim? If not, is the shiv/shim even still needed?

Thanks, here’s to getting my webflow code as clean and understandible as possible :beers:

1 Like

Hey @Todd, thanks for the questions!

  1. and 2) Those definitely sound like bugs. Looking into it.

  2. We defer to advice from http://html5doctor.com/ here. Have a look at some <section> recommendations here: The section element | HTML5 Doctor

  3. On export, we do not currently add an HTML5 shiv/shim, but are considering adding it to the default template. So far, we’ve been recommending adding a link the the shim script in the custom code section, but that can be quite confusing. I believe it’s still necessary for sites that have visitors in IE8 and use HTML5 tags.

Hey @callmevlad, thanks for the quick response. I’ll check out the HTML5doctor links. Would you mind posting again if/when the bugs are fixed? I’ll skip to other parts of my refactoring for now.

Thanks again!

Hey @Todd, just pushed a fix that resolves that section-reverts-to-div issue, and added the html5shiv (v3.7) to our default export/publish template. Let me know if it’s working for ya! :smiley:

1 Like

@callmevlad Dude - you are awesome :blush:

3 Likes

@callmevlad Hi Vlad, I have a similar question: Why is Webflow not implementing header/footer/section tags? Everything seems to be diverted to a div tag.

@mrgovindrai You have full control of what tag you want an element to have, and you can set it on the Settings Tab when an element is selected:

For example, here I changed it to a <header>:

Is that what you had in mind?

2 Likes

Oh wow! I didn’t even know that button existed…and I’ve spent days using the platform…:0 thank you, that should do!

Ok so this is happening to me too, when i change a div to a section and then point my nav link accordingly, the section switches back to a div? thought this bug was fixed?

Ok so I have fixed the problem, the sections that were reverting back to div’s had to be redone, I did this by dragging the sections content into a newly created section that I placed above it.

The newly create sections were now no longer set as symbols, so the problem of sections reverting back to div’s is when sections are set as symbols. When they are no longer symbols, everything works a splanned.