<?xml version="1.0" encoding="utf-8"?>

Using CSS element type selectors

Using CSS element type selectors

An element type selector matches elements of the corresponding type — for example, the <p>, <span>, and <div> tags. It's generally considered poor practice to apply fine detail changes with a type selector alone. Elements like <div> are quite generic, and they hold all kinds of content that you usually want to style differently.

A common use case for element type selectors is the body text, as there can only be one <body> tag on any given page. You can use it to set the defaults for the whole page. For example:

body {

padding: 0;

margin: 0;

width: 100%;

height: 100%;

}

Improve your UX & Product skills with interactive courses that actually work