Support » Fixing WordPress » Code start tag error

  • Resolved marieteather

    (@marieteather)


    Hi,

    Could someone tell me what is wrong with this code, please. It looks ok on my site but I am getting a red error message in the html editor.

    <div class=”wp-block-image”><figure class=”alignright is-resized”><figcaption><span style=”font-family: Montserrat; font-size: 12px; font-weight: 400;”>Marie Teather, <br/>Owner and Managing Editor, Olive Street Editorial</figcaption></figure></div>

    The error message says: Tag must be paired, missing: </span> start tag match failed [ span style=”font-family: Montserrat; font-size: 12px; font-weight: 400;”> ] on line 1

    Thanks

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • The error states:

    Tag must be paired, missing: </span>

    So what we’re looking for in the code block is an open <span> without a closing </span> tag. If we format and indent the code so it’s easier to read:

    <div class="wp-block-image">
    	<figure class="alignright is-resized">
    		<figcaption>
    			<span style="font-family: Montserrat; font-size: 12px; font-weight: 400;">
    				Marie Teather, <br/>
    				Owner and Managing Editor, Olive Street Editorial
    		</figcaption>
    	</figure>
    </div>

    We can see directly inside the figcaption tag is an opening span but no closing span.

    Thanks for explaining that – but I’m still not quite getting it. :/

    The figcaption looks closed to me. I see the </figcaption>

    Do I add a </span> ? I tried that earlier but no joy then….

    You would need to add a closing span </span> – post the full code and we’ll let you know what went wrong.

    I fixed it!

    Thanks so much – spacing it out like you suggested really helped.

    🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Code start tag error’ is closed to new replies.