Shloka or śloka (Sanskrit: श्लोक Ślōka , from the root śru, lit

 ‘hear’) is a poetic form used in Sanskrit, the classical language of India

In its usual form it consists of four pādas or quarter-verses, of 8 syllables each, or (according to an alternative analysis) of two half-verses of 16 syllables each

The metre is similar to the Vedic anuṣṭubh metre, but with stricter rules

The śloka is the basis for Indian epic verse, and may be considered the Indian verse form par excellence, occurring as it does far more frequently than any other metre in classical Sanskrit poetry

The śloka is the verse-form generally used in the Bhagavad Gita, the Mahabharata, the Ramayana, the Puranas, Smritis, and scientific treatises of Hinduism such as Sushruta Samhita and Charaka Samhita

The Mahabharata, for example, features many verse metres in its chapters, but 95% of the stanzas are ślokas of the anuṣṭubh type, and most of the rest are tristubhs

One of the Vedic metres is called anushtubha

It has 32 syllables with particular accents

It is the literary ancestor of the shloka which also has 32 syllables but no particular rhyme or accent

A reason for the name shloka is that Maharshi Valmiki who wrote the Ramayana once observed a pair of birds singing to each other in a tree

A hunter came by and shot the male

On seeing the sorrow (shoka) of the widowed bird, he was reminded of the sorrow Sita felt on being separated from Shri Rama and began composing the Ramayana in shlokas

For this he is called the Adikavi (first poet

)The anuṣṭubh is found in Vedic texts, but its presence is minor, and triṣṭubh and gayatri metres dominate in the Rigveda

A dominating presence of ślokas in a text is a marker that the text is likely post-Vedic

The traditional view is that this form of verse was involuntarily composed by Vālmīki, the author of the Ramayana, in grief on seeing a hunter shoot down one of two birds in love (see Valmiki)

In a broader sense, a śloka, according to Monier-Williams, can be “any verse or stanza; a proverb, saying”