Ask coding questions

← Back to all posts
How to add <a> tag in html
Subscribe2

2 questions in 1 day YAY!

I'm not sure how to do the following?

Note: <a> has to be inside the text area.
<textarea>
hello

<a>Boom!</a>
</textarea>

Voters
Subscribe2
Comments
hotnewtop
Highwayman

This...???

I have no idea, because you give absolutely no context- I don't even know what language you are trying to do this in.

Subscribe2

@Highwayman

html/python(flask)

Highwayman

Okay, so I looked into it and apparently you cannot have other html elements (such as an <a> tag..) in a textarea. I suggest instead using a div and styling it like a textarea using css and then just adding the contenteditable attribute to it in the html so they can use it like a textarea, but be able to add html elements like normal. It’s a little weird… but it should work. @Subscribe2

Subscribe2

@Highwayman

Thanks, Let me try it out.