html - Phantom strong tags in wordpress

admin2025-06-02  3

So as you can see, there are some strong tags that wordpress is obviously putting in on its own (of course because I never put them there) and appending it to my elements. I've also found two strong tags on the hero as well, but they didn't contain anything in them like these ones. What's going on here?

So as you can see, there are some strong tags that wordpress is obviously putting in on its own (of course because I never put them there) and appending it to my elements. I've also found two strong tags on the hero as well, but they didn't contain anything in them like these ones. What's going on here?

Share Improve this question asked Feb 25, 2019 at 22:31 nwhite1714nwhite1714 11 bronze badge
Add a comment  | 

2 Answers 2

Reset to default 2

You most likely haven't correctly closed a <strong> tag somewhere. This is the browser's attempt to resolve that problem.

If you look at the raw HTML source by right clicking then View Page Source (not Inspect Element) you should be able to see if there's a <strong> tag with a missing or misspelled </strong> tag.

The HTML structure you see in the Inspector tab is not the actual HTML that was received from the server, it's a document tree reconstructed by the browser based on that HTML. If you have errors in the original HTML, like missing closing tags, then the browser will be forced to find a way to fix that error so that it can create a valid DOM. This can lead to things like phantom tags.

Look at the CSS panel in Developer Tools for those elements to see what CSS file (from your theme, from elsewhere) or even if the strong tag is an in-line tag.

The source of the CSS is what will help you. Either the theme (for sure if in-line) or a plugin is causing the unwanted tag. Using Developer Tools and inspecting the element will give you (and us) more clues. Edit your question if you find additional clues.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1748864454a314358.html

最新回复(0)