Long html code (1 Viewer)

Joy83

Member
Local time
Today, 00:58
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 ?
 

Minty

AWF VIP
Local time
Today, 07:58
Joined
Jul 26, 2013
Messages
10,355
What is the actual problem?
Can you demonstrate with an example of what or where the error is?
 

sonic8

AWF VIP
Local time
Today, 08:58
Joined
Oct 27, 2015
Messages
998
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.
 

plog

Banishment Pending
Local time
Today, 02:58
Joined
May 11, 2011
Messages
11,613
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'
 

Joy83

Member
Local time
Today, 00:58
Joined
Jan 9, 2020
Messages
116
How to deal with “” inside
Like this one
<body>
<font size = "1"
The code expects that the string ended
I have many of them
 

Minty

AWF VIP
Local time
Today, 07:58
Joined
Jul 26, 2013
Messages
10,355
Put double quotes around the relevant bits

MyHtml = "<body><font size = ""1"">"
 

plog

Banishment Pending
Local time
Today, 02:58
Joined
May 11, 2011
Messages
11,613
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;'>"

 

sxschech

Registered User.
Local time
Today, 00:58
Joined
Mar 2, 2010
Messages
791
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) & ">"
 

tonyedented

New member
Local time
Today, 13:28
Joined
Apr 5, 2022
Messages
2
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

Top Bottom