input readonly html

Hello coders! In this article I have shared the details about “input readonly html”. Okay, let’s move on to the post.

input readonly html

<input type="text" id="name" name="name" readonly>
<!-- Using readonly attribute is use to prevent changing of input value. -->
Example:
<input type="text" name="username" value="ankur" readonly>
<!--The readonly attribute means that the value of input field is not editable
-->
<form action="">
<label for="country">Language:</label> 
	<input type="text" id="language" name="language" value="English" readonly>
	<input type="submit" value="Submit">
</form>

Final Thoughts

I hope this post helps you to know about “input readonly html”. If you have any questions regarding this post please let us know via the comment section. Share this tutorial with your friends & family via social networks.

Hi, I'm Ranjith a full-time Blogger, YouTuber, Affiliate Marketer, & founder of Coder Diksha. Here, I post about programming to help developers.

Share on:

Leave a Comment