JavaGeek
JavaGeek

Reputation: 1539

how to put text in border

I'm trying to insert some text in border but don't know how to do.

How can i put some text in middle of border.

Below is the screen-shot it should look like

enter image description here

Upvotes: 18

Views: 33505

Answers (4)

Mikepro
Mikepro

Reputation: 1

You can use fieldset with legend for example you want an specific area just for personal information. (Name, phone number and address)

<fieldset>
  <lengend>Personal information</legend>
  <input type="text" placeholder= "Enter name">
  <input type="text" placeholder= "Enter phone number">
  <input type="text" placeholder="Enter your address">
</fieldset>

Upvotes: 0

<fieldset>

   <legend>Some Text Here</legend>

</fieldset>

Try this Use legend inside the fieldset

Upvotes: 0

xkeshav
xkeshav

Reputation: 54074

use legend inside fieldset

The HTML Legend Field Element (<legend>) represents a caption for the content of its parent <fieldset>.

Upvotes: 3

C.L.
C.L.

Reputation: 452

Try HTML legend tag.

HTML legend

Upvotes: 23

Related Questions