CSS <frequency> Data Type
<frequency> data type denotes a frequency dimension for the pitch of sounds.
When you see
<frequency> (including the
>) anywhere in the CSS specifications, this refers to the fact that the value can be a valid frequency.
Frequency values are dimensions denoted by
<frequency>. A dimension is a
number immediately followed by a unit identifier, which is an identifier.
The unit identifiers for
- KiloHertz. A kiloHertz is 1000 Hertz.
Here are some valid
As an example, the
voice-pitch property accepts the following value/s.
So you could write something like this:
These are both relative frequencies that specify a positive offset relative to the inherited absolute frequency.
You can decrement a frequency from the inherited absolute frequency by prefixing the frequency with a hyphen.
So this example decrements the frequency by 10Hz from the inherited absolute frequency.
You can specify an absolute frequency by using the
Setting an absolute frequency means that it is not relative to the inherited absolute frequency. Therefore, if you specify
230Hz, that is the frequency that is used.
<frequency>data type is defined in CSS Values and Units Module Level 3 (W3C Candidate Recommendation, 29 September 2016)
- It is also defined in Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification (W3C Recommendation 07 June 2011)