Ways to Change Font Size in HTML

1. Pakai Inline syle

This is small text (12px) using inline styles.
and this is the second paragraph.

This is large text (24px) using inline styles.
and this is the second paragraph.

2. Pakai CSS Classes

This is small text (12px) using a CSS class.
and this is the second paragraph.

This is large text (24px) using a CSS class.
and this is the second paragraph.

This is extra-large text (48px) using a CSS class.
and this is the second paragraph.

3. Pakai HTML font Tag (Deprecated)

This is tiny text using the deprecated font tag with size="1".
and this is the second paragraph.

This is large text using the deprecated font tag with size="6".
and this is the second paragraph.

4. Pakai Rukuran relative (em, rem)

This is text with size 2em, which is 2 times the parent element's font size.
and this is the second paragraph.

This is text with size 1.5rem, which is 1.5 times the root element's font size.
and this is the second paragraph.

5. Pakai Viewport Units (vw, vh)

This text is sized using 5vw (5% of the viewport width).
and this is the second paragraph.

This text is sized using 4vh (4% of the viewport height).
and this is the second paragraph.

6. Pakai span works too

Abiant Anrifca dan banyak sering salah nulis anrifca dengan africa