Syllables have nothing to do with spelling or hyphenation (as noted in sumelic's answer). They're a unit of speech.
Also, syllabification is one of the most controversial topics in phonology.
A syllable is a unit of speech consisting of a vowel, a diphthong or a syllabic consonant with or without surrounding consonants.
I have explained syllabification in this answer to another similar question.
So how to divide words like elephant or experience into syllables?
This can be determined by Maximum Onset Principle (MOP). This principle states that intervocalic (between vowels) consonants are syllabified as the onset of the
following syllable as long as the phonotactic constraints of the language allow it.
So elephant /ˈeləfənt/ can be syllabified as:
The /l/ is intervocalic, meaning it should become the onset of the following syllable, so that the first vowel can be a syllable on it's own. Also, we know that /l/ can occur syllable-initially (as in law, light, low etc) so it can become the onset of the next syllable.
In the same vein, the /f/ becomes the onset of the syllable next to the second one (again, we know that /f/ can occur syllable-initially as in fan, fire, fit etc., so it conforms to the Phonotactic constraints).
Now absentee /ˈæbsəntiː/,
Although the /-bs-/ is intervocalic, it's not syllabified as the onset of the next syllable since English cannot have an onset like /bs-/. So the /b/ becomes the coda of the first syllable instead
So it should be syllabified as:
Now we're left with [..ntiː], if we regard the */nt-/ as the onset of the next syllable, then it breaks the phonotactics of English, because English words can't start with */nt-/. So we make the /n/ the coda of the preceding syllable /sə/ and t as the onset of the next syllable:
Last syllable is /tiː/ because according to MOP, the /t/ should be an onset of the next syllable:
Now experience /ekˈspɪə.ri.jəns/. Note that the letter ⟨x⟩ represents the cluster /-ks-/ in this instance. Now we should syllabify it in such a way that it conforms to the Phonotactics of English. It's more complicated than you might expect.
We know that English words can't start with /ks-/, so /ks/ in experience can't be the onset of the second syllable. Therefore we break the /k/ and /s/; the /k/ becomes the coda of the first syllable and the /s/ becomes the onset of the second. After the /-ks-/, we have /p/ and we know that /sp-/ can be an onset in English (as in spy, spoon, spin etc), so the /sp/ becomes the onset of the second syllable:
After that, we have /r/ and according to MOP, it should become the onset of the next syllable:
Now we have another vowel /ə/ after the front vowel /i/ and we know that when a front vowel is followed by another vowel, there's usually a palatal glide /j/ between both the words. The same goes for the last two syllables of experience i.e. there's a glide in between both the syllables (/-rijəns/) which can act as an onset of the last syllable: