cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,857)