function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sean M 3Sean M 3 

Visualforce Template </link> error

Hi all,

I'm trying to add a previously created html email into a visualforce page but I keep getting the error below:

User-added image
Here is the start of my code (which i feel is causing the issue):

<messaging:htmlEmailBody >

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"><head>


I've tried adding </link> to line 158/159 but it doesn't make a difference.

Thanks
 
Best Answer chosen by Sean M 3
Om PrakashOm Prakash
You don't need to add </link> in line 158/159, instead add </link> just after <link> tag or like my bellow example. It will work.
<link rel="stylesheet" type="text/css" href="theme.css"/>
OR
<link rel="stylesheet" type="text/css" href="theme.css"> </link>
Have a look on your code, It should satisfy all openig and closing markup tag as per bellow sample.
​<messaging:htmlEmailBody >
    <html>
        <head>
            <link rel="stylesheet" type="text/css" href="theme.css"/>
            <style>
            </style>
        </head>
        <body>
        </body>
    </html>
</messaging:htmlEmailBody>
Let me knowif still any issue.
 

All Answers

Om PrakashOm Prakash
Can you please share few piece of code near line number 159, so that I can check.
Sean M 3Sean M 3
157 </style>
158 </head>
159 <body class="clean-body" style="margin: 0;padding: 0;-webkit-text-size-adjust: 100%;background-color: #FFFFFF">
  <style type="text/css" id="media-query-bodytag">

Thanks
Om PrakashOm Prakash
You don't need to add </link> in line 158/159, instead add </link> just after <link> tag or like my bellow example. It will work.
<link rel="stylesheet" type="text/css" href="theme.css"/>
OR
<link rel="stylesheet" type="text/css" href="theme.css"> </link>
Have a look on your code, It should satisfy all openig and closing markup tag as per bellow sample.
​<messaging:htmlEmailBody >
    <html>
        <head>
            <link rel="stylesheet" type="text/css" href="theme.css"/>
            <style>
            </style>
        </head>
        <body>
        </body>
    </html>
</messaging:htmlEmailBody>
Let me knowif still any issue.
 
This was selected as the best answer