CSS Properties: How to set the minimum width of a paragraph element
Solution:
HTML Code:
Explanation:
- This HTML document demonstrates how to set the minimum width for paragraph elements.
- CSS comments are added to explain each section of the code.
- The p selector is used to target all paragraph elements.
- The min-width property is set to 120px to specify the minimum width of paragraphs.
- The background-color property sets the background color of the paragraphs.
Live Demo:
See the solution in the browser
Supported browser
![]() |
![]() |
![]() |
![]() |
![]() |
Yes | Yes | Yes | Yes | Yes |
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.