- 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
HTML size Attribute
The HTML size attribute represents the number of visible options/characters in select and input HTML element.
Syntax
Following is the syntax −
<tagname size=”number”></tagname>
Let us see an example of HTML size Attribute −
Example
<!DOCTYPE html> <html> <style> body { color: #000; height: 100vh; background-color: #8BC6EC; background-image: linear-gradient(135deg, #8BC6EC 0%, #9599E2 100%); text-align: center; } </style> <body> <h1>HTML size Demo</h1> <p>Select your favourite subject:</p> <select size="2"> <option value="Physics">Physics</option> <option value="Chemistry">Chemistry</option> <option value="Biology">Biology</option> <option value="German lang">German Language</option> <option value="Economics">Economics</option> </select> </body> </html>
Output
- Related Articles
- HTML size Attribute
- HTML size Attribute
- HTML checked Attribute
- HTML datetime Attribute
- HTML value Attribute
- HTML coords Attribute
- HTML hreflang Attribute
- HTML cite Attribute
- HTML cite Attribute
- HTML autocomplete Attribute
- HTML max Attribute
- HTML placeholder Attribute
- HTML required Attribute
- HTML target Attribute
- HTML alt Attribute

Advertisements