I want to completely remove the part between <header data-component="header"> and </header> including these two tags. There can be more or less text between the tags
How can I do that in VBA?
Below is a sample of the complete HTML page
How can I do that in VBA?
HTML:
<header data-component="header">
<div>
<h1>Example Domain</h1>
<p>This domain is for use in illustrative examples in documents. You may use this
domain in literature without prior coordination or asking for permission.</p>
<p><a href="https://www.iana.org/domains/example">More information...</a></p>
</div>
</header>
Below is a sample of the complete HTML page
HTML:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>FancyBox Lightbox Example</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.5.7/jquery.fancybox.min.css" />
</head>
<body>
<header data-component="header">
<div>
<h1>Example Domain</h1>
<p>This domain is for use in illustrative examples in documents. You may use this
domain in literature without prior coordination or asking for permission.</p>
<p><a href="https://www.iana.org/domains/example">More information...</a></p>
</div>
</header>
<div class="gallery">
<a href="2560.webp" data-fancybox="gallery" data-caption="Caption for image 1">
<img src="2560.webp" alt="Image 1" width="250">
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.5.7/jquery.fancybox.min.js"></script>
<script>
$(document).ready(function() {
$('[data-fancybox="gallery"]').fancybox({
// Options can be added here
});
});
</script>
</body>
</html>