A semantic HTML tag for a signature

netrox picture netrox · Jul 21, 2015 · Viewed 20.1k times · Source

While making a form in HTML which will get converted to PDF, I just realized there is no HTML tag that conveys the meaning that the underlined block is a signature (or should be signed).

Any suggestions on how to use a semantically correct HTML element for a signature?

Answer

Emil picture Emil · Jul 21, 2015

Why not use an input? This way, you get the correct semantics. For example, screen readers will understand that the user is expected to submit information.

.signature {
    border: 0;
    border-bottom: 1px solid #000;
}
<input type="text" class="signature" />