anonymous
anonymous

Reputation: 1711

Print symbol with superscript tag in input box

How can I print the registration symbol with a superscript tag in HTML input?

Below here is what i tried,

<input type="text" value="brand<sup>&#174;</sup>
" id="name" name="name" required minlength="4" maxlength="8" size="10">

<input type="text" value="brand<sup>&#174;</sup> id="name" name="name" required minlength="4" maxlength="8" size="10">

Upvotes: 0

Views: 60

Answers (2)

user13738991
user13738991

Reputation:

I saw your question of CSS, can you give me the solution for the same? I'm asking about your deleted question.

Upvotes: 0

Aks Jacoves
Aks Jacoves

Reputation: 877

An alternative is to create an element and make it editable, for example:

div {
  border: 1px solid black;
  padding: 0px 6px;
  width: 120px;
}
<div contentEditable="true">brand<sup>&#174;</sup>&nbsp;</div>

Upvotes: 2

Related Questions