- 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
CSS width property
The width property is used to set the width of a box. They can take values of a length, a percentage, or the keyword auto. You can try to run the following code to set width −
Example
<html> <head> </head> <body> <p style = "width:200px; height:50px; border:2px solid green; padding:15px; margin:20px;"> This paragraph is 200pixels wide and 50 pixels high </p> </body> </html>
- Related Articles
- CSS max-width property
- CSS min-width property
- CSS outline-width property
- Animate CSS width property
- Usage of width property with CSS
- Animate CSS border-left-width property
- Animate border-top-width CSS property
- The border-width Property in CSS
- The max-width Property in CSS
- The outline-width Property in CSS
- The min-width Property in CSS
- Usage of border-width property in CSS
- Use CSS width property for responsive image
- Change column-width property with CSS Animations
- Usage of border-bottom-width property in CSS

Advertisements