Join the Webstudio community

Updated 2 months ago

How HTML embed concretely works

At a glance

The community member has a question about how HTML embedding works, specifically whether scripts are executed in the body tag or packaged and put in the head to follow best practices. The comments suggest that placing scripts in the head is not the best practice, and that scripts are allowed everywhere. The best practice is to avoid render-blocking scripts by using async and defer attributes. There is no explicitly marked answer in the comments.

I have a question, how html embed concretely works, is it just scripts executed in the body tag as is, or it's packaged and put in the head to respect best practices ?
O
Z
3 comments
head is not best practice, scripts are allowed everywhere
best practice is avoid render-blocking scripts everywhere, using async and defer
Add a reply
Sign up and join the conversation on Discord