Skip to main content
Inspiring
June 18, 2018
Answered

TypeError: Error #1085: The element type "br" must be terminated by the matching end-tag "</br>".

  • June 18, 2018
  • 1 reply
  • 7269 views

So this piece of code works as intended:

privacyPolicy.htmlText = "<br>First line.<br>Second line.";

However, when I'm downloading the same message from a php file I get:

TypeError: Error #1085: The element type "br" must be terminated by the matching end-tag "</br>".

Also, I'm trying to create a hyperlink in ym text field. I've tried this:

hLink.htmlText = "<a href='http://mylink.com/>Click Here</a>";

But, the the text field is blank.

This topic has been closed for replies.
Correct answer Ned Murphy

privacyPolicy.htmlText = "<br>First line.</br><br>Second line.</br>";

Try embedding the font in the textfields if nothing is showing up.  Also it appears you are missing a single quote in the hyperlink code.  I forget if single quotes will work, so see about using escaped doublequotes there if problems persist.

1 reply

Ned Murphy
Ned MurphyCorrect answer
Legend
June 18, 2018

privacyPolicy.htmlText = "<br>First line.</br><br>Second line.</br>";

Try embedding the font in the textfields if nothing is showing up.  Also it appears you are missing a single quote in the hyperlink code.  I forget if single quotes will work, so see about using escaped doublequotes there if problems persist.

SwyzeAuthor
Inspiring
June 18, 2018

It works, but I'm getting a strange text-indent in the first line when I do the following:

First paragraph.<br>Second paragraph</br>

Is that normal?

Ned Murphy
Legend
June 19, 2018

I would say it is not normal.  I still work (play actually) in Flash, so I don't know if this might be an issue with Animate.If I assign that string to a textfield I do not get an indent of the first line.   Maybe try setting a few properties in the properties panel and see if they have any effect.