Tsallaka zuwa abun ciki
Justice Tech School

Values: Keywords, Numbers and Functions

Values can be keywords such as auto, numbers with units, colours, strings and functions such as calc() and var(). inherit, initial and unset reset how a value is chosen.

Example
<style>
.x { width: calc(100% - 40px); color: inherit; margin: auto; background: #1e293b; padding: 8px }
</style>
<div class="x">calc width and auto margin</div>

Exercise

Math function.

width: (100% - 20px);

Quiz Test

Which keyword takes the parent value?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.