Guitars have frets; violins do not. This distinction stems from how each instrument is played and the musical demands placed on them.
Frets provide exact finger placement for consistent intonation, which is essential for playing chords—multiple notes simultaneously. Without frets, forming chords accurately across six strings would be extremely difficult.
The violin's fretless fingerboard allows continuous pitch variation. Violinists rely on ear training and muscle memory to place fingers precisely, enabling techniques like portamento (sliding between notes) and microtonal adjustments that define the instrument's expressive voice.
Both designs are optimized for their respective musical roles—guitars for harmonic accompaniment and violins for melodic expression.