The correct choice of the “articles” a and an depends on the initial sound of a word, not on the initial letter, of the word that they precede.
The letter a should be used before all words beginning with a consonant sound except silent h (an honor) and before words beginning with vowels that represent combined consonant and vowel sounds (university, unit).
Examples: a boy, a European, a j, a picture, a store, a table, a bottle, a window, a phone, a hyphen, and a one-horse town.
There are also words that begin with vowels that have a consonant sound. Say “unique” out loud and you will hear that it contains in its first syllable a consonant y sound as well as the vowel oo sound. You are saying (phonetically) yoo-NEEK. Similarly, “union”, “use”, and “eulogy” begin with a consonant y sound and call for the article a. If you use your ears, you will never be guilty of “an historic” or “an unique.”
Let’s repeat and expand this concept: a is used in front of words that begin with a long u (when pronounced as yoo), eu, and ew, and before the word one. Examples: a united country, a usurper, a eulogy, a ewe, a U-boat, a European, a one-horse town, and many a one.
The word an should be used before all vowel sounds (a, e, i, o, u). Examples: an entry, an f, an hour, an orange, an ape, an odor, an idea, an eagle, an honor, an umbrella, and an unbeliever.
One of the most common mistakes, both written and oral, is the use of an before “historical” or “historic”. When the word following the article begins with a consonant sound, the article used is a; when it begins with a vowel sound, the article used is an.
So remember, a word may in fact begin with a consonant, yet have an initial vowel sound. The word “honest” is a case in point. Say it out loud and you will see what is meant.
The initial consonant h is silent, so the word has an initial vowel sound; hence, an honest man, an hour ago, an heir to the throne, an honest and an honorable peace; on the other hand, when a word begins with an aspirated h (a speech sound followed by a puff of breath or the speech sound represented by English h), correct usage is a hotel, a house, a hill, a hymn, a honeycomb, and a history or a historical.
The dietician said Keith should eat an apple every day and at least one banana.