3 For this is the one having been spoken about by Isaiah the prophet, saying: “A voice calling out in the wilderness; prepare the way of the Lord; make His ways straight.”
Matthew, Mark, and Luke all quote parts of this prophecy. Mark adds some words from Malachi 3.1:
As was written by Isaiah (“Jehovah’s help”) the prophet: “See I send My envoy ahead of you, who will construct your road.” – Mark 1.1
Luke includes more from the prophecy from Isaiah:
5 Every ravine will be filled in and every mountain and hill will be reduced to a plain. And the crooked (ways) shall be straightened out and the rocky places into smooth places.
6 And the salvation of God will be seen by everyone – Luke 3.5-9.
All three are guided by the Holy Spirit to include these prophecies that gives to John his identity, which comes from God.
It is clear that the crowds hoped that John was the prophetic voice of Elijah who would bring the announcement that the Messiah was about to come among them.
The religious leaders also thought that John might be the fulfilment of Malachi’s prophecy that Elijah would return just prior to the coming of the Messiah:
 “Look, I am sending you the prophet Elijah before the great and dreadful day of the LORD arrives.
 His preaching will turn the hearts of parents to their children, and the hearts of children to their parents. Otherwise I will come and strike the land with a curse” – Malachi 4.5-6 (NLT).
However, it is also clear that John does not seem to recognise this; we gather this from John’s gospel:
And they asked him: “Who then, are you Elijah”? And He says: “I am not.”
“Are you The Prophet”?
And he replied: “No.” – John 1.21.
John was stating that he was not literally Elijah coming from heaven, yet he knew that he was sent by God to proclaim the message of God in the spirit of Elijah.
Later on Jesus was to confirm that Elijah had already come, and He was referring to John the Baptist.