How to download a webpage with cURL and save it as an HTML file?

To download a webpage with cURL and save it as an HTML file, you can use the following command:

curl -o filename.html URL

Replace "filename.html" with the desired name for the saved file and "URL" with the webpage URL that you want to download.

For example, to download and save the Google homepage as "google.html", you can use the following command:

curl -o google.html https://www.google.com

This will save the web page HTML content as a file named "google.html" in the current directory.