Keyword density is defined as the percentage of times a keyword appears on a web page compared to the total number of words on the page.