$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>html - Phantom strong tags in wordpress|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

html - Phantom strong tags in wordpress

matteradmin9PV0评论

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.

Articles related to this article

Post a comment

comment list (0)

  1. No comments so far