Long html code

Joy83

Member
Local time
Today, 09:01
Joined
Jan 9, 2020
Messages
116
Hi,
I am struggling with a very long html code that I want to use in the email body
But I got issue due to the length and the format as inside it there are a lot of “” which cause issues

any suggestions how I can handle this ?
 
What is the actual problem?
Can you demonstrate with an example of what or where the error is?
 
I am struggling with a very long html code
One approach to debugging it would be to write it to a text file and then open that with an editor suitable for HTML.
 
A sample demonstrating your issue woud help. Without that I would suggest using double quotes on the outside and single quotes on the inside, or vice versa:

"Double quote to start and end the string, but then 'a word' inside single quotes inside the string"

'Or as I said, do it "vice versa" like this'
 
How to deal with “” inside
Like this one
<body>
<font size = "1"
The code expects that the string ended
I have many of them
 
Put double quotes around the relevant bits

MyHtml = "<body><font size = ""1"">"
 
Double on outside, single on the inside or vice versa.

Also, <font> is deprecated in html5, you should be using css:

"<body style='font-size: 12px;'>"

 
I used chr(34) to represent the double quote like this:
Code:
stMessage = "<BODY style=" & Chr(34) & "font-size:11pt;font-family:Calibri" & Chr(34) & ">"
 
Here are some HTML tutorials that will help you with the long codes.

In this HTML tutorial, we'll learn about HTML, its application, and a detailed explanation of various HTML tags. Apart from that, we'll also learn how to apply the code in real project scenarios, setting up the requisite IDE (VS Code) for working with HTML. Installing and launching the live server, pre-processors like HAML and their pros and cons, Handlebars and HTML, etc.
 

Users who are viewing this thread

Back
Top Bottom