Hi and Welcome. My Name is ***** ***** I look forward to assisting you today with your question.
Yes, you can do it online. In your Mac, click on the Apple menu at top left and select App Store. In App Store, click on Updates tab at top and you will see El Capitan there. Click Free Upgrade and this will download it. It is a big file, so it would take a few hours to download and install. Once it is downloaded, you will be asked to install. Just follow the onscreen instructions to install it.
Or click this link to download it --> https://itunes.apple.com/us/app/os-x-el-capitan/id1018109117?mt=12
If you have any questions or would like any additional information, please don't hesitate to ask,