The FAA has a website to download free text books to learn all the things required to become a pilot. https://www.faa.gov/regulations_policies/handbooks_manuals/aviation/
Is there a similar website for sailors? Thanks
Depending on the country rules may change but generally you only need to know navigation rules (i.e. https://www.navcen.uscg.gov/?pageName=NavRulesAmalgamated) and possibly additional rules for your region (i.e. https://boat.wa.gov/boating/the-laws/). There is basically all you are required to know.
If you have your own sail boat or use friends' boats - that's possibly it (at least in US). Depending on a region and a boat you may need some license (which go overs rules for your region, i.e. in Washington State you need license if engine is above a particular power).
If you need to rent a boat there would be some requirements by a company/club that is going to provide you a boat. Usually it means you need to have some certificate from a sailing organization in your country/region matching the type boat and duration of the rental. I.e. in US - it is either ASA (like https://asa.com/certifications/asa-101-basic-keelboat-sailing/) or US Sailing (https://www.ussailing.org/education/adult/certification-courses-endorsements/). Search for your country's sailing association to find region specific info as well as more global once like https://www.rya.org.uk/training.
Please note that while sailing and motor boating in US have far less official regulation that flying (and even less than driving) it is still a very good idea to take a lessons from a good sailing school even if you have your own boat. At very least find a friend and practice docking and MOB recovery (for you and whoever you going to sail with).