Hey, anuragsggs! Welcome to Electro-Tech!
I built a line-following robot a while ago that worked really well that simply used a CdS LDR. I'm pretty sure you could also use a phototransistor with the same circuit. Do you have the circuit you plan to use yet? My line-follower was based on David Cook's "Sandwich" robot on robotroom.com (featured in his book, "Robot Building for Beginners"). It's probably simpler than using a webcam
Hope this helps!
Der Strom