cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
sannadisarath
Level: Powered On

How to remove header tags from HTML page content

Hi,

 

Can some one please help me how on removing HTML header tag from page content, 

ex: <head>this is the title</head>

 

i want to remove whole head tag from the HTML.

 

Thanks,

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: How to remove header tags from HTML page content

@sannadisarath 

Suppose you have the following HTML in a global variable

 

 

Set(myHTML,"<html><head>this is the title</head><body>Hello World!</body></html>");

 

 

You can use this code to concatenate the text strings on either side of the <head> tags

 

 

Left(myHTML,Find("<head>",myHTML)-1)&Right(myHTML,Len(myHTML)-Find("</head>",myHTML)-6)

 

 

With a final result of

 

"<html><body>Hello World!</body></html>"

 

---
Please click "Accept as Solution" if my response helped to solve your issue so that others may find it more quickly. If your thought the post was helpful please give it a "Thumbs Up."

View solution in original post

1 REPLY 1
Super User
Super User

Re: How to remove header tags from HTML page content

@sannadisarath 

Suppose you have the following HTML in a global variable

 

 

Set(myHTML,"<html><head>this is the title</head><body>Hello World!</body></html>");

 

 

You can use this code to concatenate the text strings on either side of the <head> tags

 

 

Left(myHTML,Find("<head>",myHTML)-1)&Right(myHTML,Len(myHTML)-Find("</head>",myHTML)-6)

 

 

With a final result of

 

"<html><body>Hello World!</body></html>"

 

---
Please click "Accept as Solution" if my response helped to solve your issue so that others may find it more quickly. If your thought the post was helpful please give it a "Thumbs Up."

View solution in original post

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (4,878)