CSS Units

Dear Sciaku Learner you are not logged in or not enrolled in this course.

Please Click on login or enroll now button.

If you have any query feel free to chat us!

Happy Coding! Happy Learning!

Lecture 45:- CSS Units

CSS units are used to specify the size and dimensions of elements in a web page. There are several units of measurement that can be used in CSS, including:

  • Pixels (px): a unit of length that is fixed and corresponds to a physical pixel on the display.
  • Points (pt): a unit of length commonly used in print design, equal to 1/72 of an inch.
  • Ems (em): a unit of length that is proportional to the font size of an element. 1em is equal to the size of the font for that element.
  • Rems (rem): similar to ems, but 1rem is equal to the font size of the root element (usually the html element), making it a more consistent unit across the entire document.
  • Percentages (%): a unit of length relative to the size of the parent element. For example, setting the width of an element to 100% will make it fill the entire width of its parent.
  • Viewport units (vw, vh, vmin, vmax): units of length based on the size of the viewport (the visible portion of the web page). 1vw is equal to 1% of the viewport width, 1vh is equal to 1% of the viewport height, and vmin and vmax are equal to the minimum and maximum of the viewport width and height, respectively.

When specifying length in CSS, you should choose the unit of measurement that best fits your needs and provides the desired behavior. For example, when specifying the width of an element, you may use pixels for a fixed width, or percentages for a flexible width that adjusts to the size of the parent element. Similarly, when specifying font size, you may use points for a fixed size, or ems for a size that is proportional to the surrounding text.

6. Styling With CSS

Comments: 2

profile
@niteshguptav63
17-Nov-2024, 01:39 PM

I am not able to access videos from second class and further. I have already completed first class

profile
@niteshguptav63
16-Nov-2024, 10:56 AM

When will I get my course?

profile
@admin79
17-Nov-2024, 01:29 PM

Now, Your query was resolved.

Frequently Asked Questions (FAQs)

How do I register on Sciaku.com?
How can I enroll in a course on Sciaku.com?
Are there free courses available on Sciaku.com?
How do I purchase a paid course on Sciaku.com?
What payment methods are accepted on Sciaku.com?
How will I access the course content after purchasing a course?
How long do I have access to a purchased course on Sciaku.com?
How do I contact the admin for assistance or support?
Can I get a refund for a course I've purchased?
How does the admin grant access to a course after payment?