How to write html classes with Concatenate formula

Hi!

I’m trying to concatenate data to export html to use in woocommerce.

I have this error with “” and I’m not expert with html. How could I solve this error?

Concatenate(“p class=“author-txt”>”,“Autor: “, thisRow.Autor,”

”)

**Unexpected value **
Found an unexpected author-txt in the expression "p class="author-txt

image

Both HTML and Coda support single bracket pairs '' and double bracket pairs "" as text value delimiters.

So either write:

Concatenate('p class="author-txt">', 'Autor: ', Autor, '</p>')

or

Concatenate("<p class='author-txt'>", "Autor: ", Autor, "</p>")

The first one is preferred so that the resulting HTML uses double quotes. But even better, use Format:

Format(
  '<p class="author-txt">Autor: <![CDATA[{1}]]></p>',
  Autor
)

It will replace the {1} with the first parameter. And you should include <![CDATA[ ]]> around your inserted values so that if Autor has special HTML characters (e.g. an ampersand &), it is not treated as HTML code by a browser that will open your email but used at face value. That’s because there’s no HTML encode formula in Coda at the moment.