CSS - Set 4

HTML Question & Answer Practice

CSS Practice – Questions & Answers

Beginner Level

CSS Q46. Reset CSS?

Removes default browser styles.

CSS Q47. Border radius?
border-radius: 10px;
CSS Q48. Width property?
width: 200px;
CSS Q49. Height property?
height: 100px;
CSS Q50. Background image?
background-image: url(img.jpg);

Intermediate Level

CSS Q51. Background repeat?
background-repeat: no-repeat;
CSS Q52. Center background image?
background-position: center;
CSS Q53. Object-fit?

Controls image fitting.

CSS Q54. rem vs px?

rem is relative; px is fixed.

CSS Q55. Visibility hidden?

Hides but keeps space.

Advanced Level

CSS Q56. CSS variables?

Reusable values.

CSS Q57. Variable example.
:root { --main:red; }
color: var(--main);
CSS Q58. Calc()? width: calc(100% - 50px);
CSS Q59. Aspect-ratio?

Maintains width-height ratio.

CSS Q60. Best practice?

Use external CSS & responsive design.

No comments:

Post a Comment