- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to set the name of the element in HTML?
Use the name attribute to set the name of the element. You can use this with the following HTML elements: <button>, <fieldset>, <form>, <iframe>, <input>, <map>, <meta>, <object>, <output>, <param>, <select>, <textarea>
Example
You can try to run the following code to implement name attribute −
<!DOCTYPE html> <html> <body> Subject: <input type = "text" name = "sub" spellcheck = "true"> <p>Add an incorrect spelling for a word above and see what happens.</p> <p contenteditable = "true" spellcheck = "true">This is an editable conttent, with a spelling mistake. Click to edit.</p> </body> </html>
- Related Articles
- Set the name of the form the element belongs to in HTML?
- Set the width of the element in HTML
- How do we set the type of element in HTML?
- How to set HTML content of an element using jQuery?
- How to set that the specified element/group of elements should be disabled in HTML?
- How to find an element using the attribute “HTML tag name” in Selenium?
- How to add the height of the element in HTML?
- How to add the value of the element in HTML?
- How can I set the default value for an HTML element?
- How to set style display of an html element in a selenium test?
- How do we set the text direction for the content in an element in HTML?
- How to set the URL of the media file in HTML?
- How to set the width of an element in JavaScript?
- How to set whether an element is draggable or not in HTML?
- How to set the bottom margin of an element?

Advertisements