There are some basic differences that are both important and unimportant:
The basic game does not contain pregenerated characters or adventures. The starter set does.
The starter set does not contain character creation rules, full spell lists or advancement past L5 for it's pregenerated characters, the basic rules online do contain this information.
the starter set has a limited version of the rules, and only contains the monsters necessary for the adventure, the basic rules have a much wider bestiary, more magic items and a complete set of the rules.
The starter set is intended to be a quick introduction to D&D, to which you can later add the basic D&D rules online as you need more rules for more situations and advance past L5 (which is when the starter set ends).
If you want more options beyond the basic rules (for character creation, monsters or rules), the printed books provide this information.
(Preface: The below answer was initially written before WOTC's acquisition of D&D Beyond on 2022-04-13. I assume the acquisition would not make my conclusion of 'treat the digital sourcebooks as official' less valid.)
I believe at least the digital versions of the sourcebooks themselves (currently listed here) should be treated as an official rules source roughly on par with the books.
Firstly, WOTC considers D&D Beyond to be an official digital toolset for the game (though, until the acquisition, D&D Beyond wasn't made by WOTC directly, but licensed through them):
This morning, Curse launched D&D Beyond—an official digital toolset for Dungeons & Dragons fifth edition.
(dnd.wizards.com, 2017-08-15)
Secondly, the books on D&D Beyond are considered to be 'digital sourcebooks', which, on their own site, are defined thusly:
A digital sourcebook is a completely digital version of one of the published books, such as the Player's Handbook or adventures like Curse of Strahd. You will get the book re-created in digital format, as well as unlock all of that book's content for use throughout the toolset - both for current tools and anything on the roadmap (such as encounter building/ combat tracking, etc.).
As they are considered a 'completely digital version of one of the published books', I'd say they're as official-source-worthy as said books.
In addition, BadEye (Adam Bradford, D&D Beyond product lead at Curse at the time of posting) also calls D&DB an official source, mentioning that their site is meant to be kept up to date with the rules as new changes come in:
Errata will be incorporated as it comes in. As an official source, it's important that we always stay current.
Ultimately, due to the above, I feel D&D Beyond's version of the sourcebooks should be considered as official as the books themselves. If there's a discrepancy between their content and the most recent errata/printed version of a book, then the book (plus relevant errata) is the 'most canonical', sure, but I don't think the potential for that kind of mismatch/data entry/out of date error would make the rules from the site overall considered 'unofficial'.
Disclaimer: The above only applies to content on D&DB from the official sourcebooks. D&DB also hosts various things that shouldn't be considered official, such as usermade homebrew, forum posts, and unofficial sources such as the Blood Hunter class from Critical Role/Matthew Mercer- these are usually kept separate in the site's navigation. The SRD & Basic Rules are also hosted there in a combined section, but even the WOTC-hosted PDF/printed versions of the SRD is considered unofficial:
The sword of sharpness deals an extra 14 slashing damage when you roll a 20 on its attack roll. The SRD incorrectly says otherwise. Note that the SRD is not an official rules source for D&D. #DnD
@JeremyECrawford, 9:54 PM - 4 Jan 2018
In addition, applicable Unearthed Arcana content was once hosted there (for the UAs released in the range of Jan 8, 2018 to the discontinuation of UA on D&DB around August 2021), which should be treated the same 'officially unofficial' way any other UA content is treated.
While the parts of D&D Beyond that are aggregates of data from the sourcebooks (such as the "Races" section, the "Monsters" section, etc.) contain reproductions of sourcebook data, they seem to be slightly more prone to data entry errors- I'd recommend using the digital sourcebooks' version in the case of finding a conflict between the two.
(On the topic of "what's considered an official sourcebook?", @nitsua60's longstanding question/answer "Where do I find the “official” rules for D&D 5e?" is worth a read as well.)
Best Answer
They are QUITE different
They serve both a different purpose, AND contain different content.
Newbie Set vs. Legal Document
The Basic Rules were released prior to the SRD, and are designed to provide a very limited set of gameplay material in order to give players a taste of D&D 5E before they purchased it.
The SRD is a legal document intended to provide all of the 5E rules and material that Wizards of the Coast consider to be Open Source material that is legal to use under the Open Game License (OGL). You may read the details of this license at the top of the actual SRD pdf
In other words, if you want to create and sell material for D&D 5E, then you may only use material that exists in the SRD or material that you invent.
For example...the iconic D&D monster The Beholder does not exist in the SRD. Therefore, if you want to create content under the OGL, you may not use a Beholder in that content.
Differences in Content
The SRD and the Basic Rules contain dramatically different amounts of Content.
The Basic Rules only includes content for 4 classes: Cleric, Fighter, Rogue and Wizard, each with only a single sub-class (Life Domain, Champion, Thief, and Evoker). Only 4 races are offered: Dwarves, Elves, Humans, and Halflings.
The SRD, on the other hand, contains every Race and Class from the PHB, with at least one sub-class per Class. Additionally, there are several Monsters included in the SRD that are not in the Basic Rules, such as the 'Tribal Warrior.'
Going the other direction, the SRD includes precisely one Background: The Acolyte. The Basic Rules contains 5 backgrounds.
Conclusion
I suppose the best way to show the difference is to simply share what Wizard of the Coast says about them...
Regarding the Basic Rules...
And the SRD