The relationship between spelling and grammar is one that relates to word meaning and context. Established structural rules of grammar are particularly important regarding the use of homonyms and homographs, which are words with identical or nearly identical spoken sounds but with different spellings. Phrases that are grammatically correct but include an incorrectly-spelled word can end up with completely altered meanings. Other common errors in written language include incorrect possessive forms, contractions, and preposition choices. Spelling and grammar are usually the first indications of writers' credibility, authority, and level of education and the proper use of both is essential for any type of written communication to be effective.
Many languages have some discrepancies related to words that sound alike when spoken but are spelled quite differently. These variations in spelling alter the meanings of these words and therefore do not allow them to be interchangeable in written composition. The words "affect" and "effect" have nearly identical spoken pronunciations, for instance. "Affect" is classified as a verb while "effect" is normally designated a noun, and these words are examples of homographs. A common writing mistake in spelling and grammar involves switching one of these words for the other and creating a grammatically incorrect phrase or sentence.
Connections between a word's spelling and its sound are explored in an area of linguistics known as phonology. Syntax refers to the specific rules dictating how a group of words can be arranged into a correct sentence. Hearing a spoken sentence that sounds accurate can sometimes lead to confusion when the same sentence is written down with inconsistent spelling and grammar. Introductory courses in composition often include demonstrations of how phonology and syntax need to be applied simultaneously in order to create written work that does not contain misplaced homographs or homonyms.
Spelling and grammar are closely related through morphology, which is a systematic way of examining the elements that give language its meaning. These elements include both words and the grammatical modifiers that change them as sentence structure rules dictate. Mistakes in spelling can result from an inaccurately-placed apostrophe when writing singular or plural possessives. A word that is intended to be in singular form can accidentally become a plural possessive when the apostrophe follows the "s" rather than precedes it. The same principle applies to written errors in contractions that can usually lead to confusion on the part of the reader; an example could be "does'nt" instead of "doesn't."