The United States Code (federal law) is located in a few places online. You can see the current edition from the US House of Representatives online page here: https://uscode.house.gov/. The Government Publishing Office (GPO) has both the current and previous editions here: https://www.govinfo.gov/app/collection/uscode.
For the Code of Federal Regulations, you can find it here: Again, the GPO has the current and previous versions, just like the Code, here https://www.govinfo.gov/app/collection/CFR