I have received around 1200 HTML pages, each containing one <p> </p> near the top and I’d like to target these in the CSS file. They leave an unsightly gap there and I’d like to reduce those down to line-height .001, with padding and margin set to 0.
Is it possible to target these cases via an external CSS stylesheet while leaving untouched the paragraphs containing real content? I’d like to consider this option before opening and closing 1200 pages to delete these empty paragraphs.
Are they always in the same position in relation to other elements? If so, you could possible target this using those. E.g. If it always came directly after the h1 element, you could do something like
If the code is redundant and occurs once per page, is there a reason why you can’t search and replace? For static pages, a good text editor will process multiple files at one pass. If they are in database, commands should be available to do the same.