Ranjith Ranjith - 2 months ago 18
HTML Question

div content with border css

I am new to css, and I am trying to create a div element with a border, like

this

My

HTML
is below:

<div class="mystyle">
<h3>header message<h3>
<p> this is my content</p>
</div>

Answer

Use <fieldset> tag with <legend> inside it.

Try this code:

<fieldset>
  <legend>Example</legend>
  <div class="mystyle">
    <h3>header message</h3>
    <p>this is my content</p>
  </div>
</fieldset>