# {% module %} template is being out of the \<span /\>

**URL:** <https://community.hubspot.com/t/module-template-is-being-out-of-the-span/85341>\
**Category:** CMS Development\
**Tags:** design-manager\
**Created:** [July 14, 2023, 7:17am UTC](https://community.hubspot.com/t/module-template-is-being-out-of-the-span/85341 "2023-07-14T07:17:57Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrepede](https://avatars.discourse-cdn.com/v4/letter/m/e47774/32.png) [@mrepede](https://community.hubspot.com/u/mrepede)\
**Post date:** [July 14, 2023, 7:17am UTC](https://community.hubspot.com/t/module-template-is-being-out-of-the-span/85341/1 "2023-07-14T07:17:57Z")

</div>

Hi

I am currently in the process of exporting a landing page template to HubL and have been utilizing the single line text module.

In this module, the code is enclosed within a \<span\> tag as follows:

\<p\>\<span\>{% module “${key}”,  
path=“@hubspot/text”,  
label=“${label}”,  
value=“${text}”  
%}\</span\>\</p\>

However, I am encountering a difficulty. Post-export, in the HubSpot Landing Page, the module input seems to be falling outside of the span, as demonstrated below:

\<p\>\<span\> \</span\>\</p\>  
\<div id=“hs\_cos\_wrapper\_3ff53984-8111-2fdf-b8a4-ac7de550b901” class=“hs\_cos\_wrapper hs\_cos\_wrapper\_widget hs\_cos\_wrapper\_type\_module widget-type-text hs-baymax-editor” style=“” data-hs-cos-general-type=“widget” data-hs-cos-type=“module” data-hs-overrideable=“true” data-test=“selenium-widget-editor-ready”\>\<div id=“hs\_cos\_wrapper\_3ff53984-8111-2fdf-b8a4-ac7de550b901\_” class=“hs\_cos\_wrapper hs\_cos\_wrapper\_widget hs\_cos\_wrapper\_type\_text” style=“” data-hs-cos-general-type=“widget” data-hs-cos-type=“text”\>As an SEO specialist, you understand the challenges of making healthcare more accessible and profitable.\</div\>\</div\>

Given that the module input is not enclosed within the span, the designated styles are not applying correctly, resulting in broken formatting.

I would appreciate any insights or advice on how to correctly place the module input within the \<span\> tag to prevent this issue.

Thanks!

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [July 14, 2023, 10:57pm UTC](https://community.hubspot.com/t/module-template-is-being-out-of-the-span/85341/2 "2023-07-14T22:57:09Z")

</div>

Hi, @mrepede 👋 Thanks for your question. Let’s invite some of our community members to the conversation — hey @alyssamwilie @louischausse @carolgiacon @Anton, do you have any feedback for @mrepede? Have you been successful with doing this without creating a custom coded module?

Thank you for taking a look! — Jaycee

---

<div class="post-metadata">

**Author:** ![alyssamwilie](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/alyssamwilie/32/2072_2.png) [@alyssamwilie](https://community.hubspot.com/u/alyssamwilie)\
**Post date:** [July 15, 2023, 1:30am UTC](https://community.hubspot.com/t/module-template-is-being-out-of-the-span/85341/3 "2023-07-15T01:30:39Z")

</div>

This is happening because paragraph tags cannot have block elements inside them (aka the \<div\>s). If you add no\_wrapper=True to the module tag it should render without the divs.

{% module “${key}”,  
path=“@hubspot/text”,  
label=“${label}”,  
value=“${text}”,

no\_wrapper=True  
%}

Will note however that I believe the wrapper is how HubSpot makes the module clickable within the page editor so removing that means someone editing a page with this template would have to locate the module in the editor sidebar to edit it. So if you want it to be ‘click to open’ you’ll have to instead not use a paragraph tag around the module.

---

<div class="post-metadata">

**Author:** ![mrepede](https://avatars.discourse-cdn.com/v4/letter/m/e47774/32.png) [@mrepede](https://community.hubspot.com/u/mrepede)\
**Post date:** [July 17, 2023, 8:32pm UTC](https://community.hubspot.com/t/module-template-is-being-out-of-the-span/85341/4 "2023-07-17T20:32:50Z")

</div>

Thanks for your suggestion. I tried as you suggested.

{% module “${key}”,  
path=“@hubspot/text”,  
label=“${label}”,  
value=“${text}”,  
no\_wrapper=True  
%}

\<p\>\<span class=“tofu-element” data-tofu-id=“3ff53984-8111-2fdf-b8a4-ac7de550b901”\>{% module “3ff53984-8111-2fdf-b8a4-ac7de550b901”,  
path=“@hubspot/text”,  
label=“The industry has struggled to make healt”,  
value=“The industry has struggled to make healthcare more accessible, but [MyCompany] is here to help. Our services can unlock profitability in the telehealth industry.”,  
no\_wrapper=True  
%}\</span\>\</p\>

But it’s still falling outside of the span.

\<p\>\<span class=“tofu-element” data-tofu-id=“c39e413b-54ea-fa13-8504-79bf3469ecc9”\>\</span\>\</p\>

\<div id=“hs\_cos\_wrapper\_c39e413b-54ea-fa13-8504-79bf3469ecc9\_” class=“hs\_cos\_wrapper hs\_cos\_wrapper\_widget hs\_cos\_wrapper\_type\_text” style=“” data-hs-cos-general-type=“widget” data-hs-cos-type=“text”\>Unlock the ROI in telehealth with our expert SEO services for companies struggling.\</div\>

Does it mean that we can’t edit the copy in span, p tags?

Thanks!

---

<div class="post-metadata">

**Author:** ![alyssamwilie](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/alyssamwilie/32/2072_2.png) [@alyssamwilie](https://community.hubspot.com/u/alyssamwilie)\
**Post date:** [July 18, 2023, 1:14pm UTC](https://community.hubspot.com/t/module-template-is-being-out-of-the-span/85341/5 "2023-07-18T13:14:56Z")

</div>

Hm, yea, looks like it only removes one of the divs. So you’ll have to just _not_ put the module in a paragraph tag. Once removeing the \<p\> the \<span\> should still work. It’s only the \<p\> tag that explicility doesn’t allow block elements in it.

---

<div class="post-metadata">

**Author:** ![mrepede](https://avatars.discourse-cdn.com/v4/letter/m/e47774/32.png) [@mrepede](https://community.hubspot.com/u/mrepede)\
**Post date:** [July 21, 2023, 2:21am UTC](https://community.hubspot.com/t/module-template-is-being-out-of-the-span/85341/6 "2023-07-21T02:21:23Z")

</div>

We’re mostly trying to update copies on landing pages that are inside p or span tags. Could this be a limitation of HubSpot, do you think?
