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

My HTML is below:
<div class="mystyle"> <h3>header message<h3> <p> this is my content</p> </div> 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> We can do this with the help of 2 HTML tags:
1.<fieldset></fieldset> and <legend></legend> tags. <legend> tag defines a caption for the <fieldset> tag and that caption comes with the border which you are looking for... Ex:
<fieldset> <legend>What is Lorem Ipsum?</legend> <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p> </fieldset>
<legend>and<fieldset>?