Thuta Learning
BasicWeb Developmentbeginner

Fonts

Relax. We'll talk through this in plain words — no textbook voice.

What you'll walk away with

  • Be able to set font family, size, and weight

Font is the voice of a website. A clean font makes it feel professional. A well-chosen font size makes content easy for users to read. In CSS, it's good practice to write font-family with several fallback fonts. If the user's device doesn't have the first font, the browser can fall back to the next one.

css
body {
  font-family: "Noto Sans Myanmar", "Myanmar Text", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
}

h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 800;
}
You should see
The whole page will have a Myanmar font fallback, and the H1 will be responsive to screen size.

Tip

clamp() is useful for responsive font sizes. You can control it with three values: minimum, preferred, and maximum.

Fonts | Thuta Learning