Here is an example of simple CSS only blinking cursor that you can use and modify according to your needs.
I have used keyframes to introduce infinite blinking animation to the cursor.
See the Pen Simple CSS Blinking Cursor by Puneet Sharma (@webdevpuneet) on CodePen.