To build websites from scratch. You'll need to learn html, css and even php and mysql if you want to build a website with a database such as this website or any other website that has a database.
If you want to build a Static website. You'll won't need the php and mysql unless you want to build the website pages in php.
You can learn this stuff online or you can take a college course on building websites.
To learn html you can go to https://www.w3schools.com/html/ and https://www.codecademy.com/learn/make-a-website
To learn php you can check out https://www.codecademy.com/learn/php for mysql check out www.mysqltutorial.org