Custom html form

how to crate custom html form that will generate lead automatically ?
where to write html form code , py , js code?