You can never get good online and if you can't beat the person online you can probally beat him offline much more easier.
I'd say I play respectably, and most of my initial experience playing the game was from online.
You can still improve your gameplay if you work your mental (prediction) game instead of concerning yourself with lag-hits. You familiarize yourself with things like tech behaviors, ledge behaviors and even bits of matchup behaviors - things that you don't learn by playing vs computers and/or crappy people. Granted, this is assuming that you play using an online community and don't have an offline crowd to improve with.
Then again, when I did play online, it was during the initial Brawl rush, so I got to play awesome people like known names from Melee and/or rising stars in Brawl (ex: Ally <3), and if not, at least people who are known to play well with their characters.
Even with lag, you can feel the difference between their spacing/mental game compared with lower-level players.
Also, when I eventually did make the switch to offline play, it was glorious - like, I was mentally prepared to shield things from online play (that kinda thing you get from playing vs... players instead of computers), except there was no input lag so I'd actually be able to defend.
And with the practice, I don't know how I should practice, and for how long (mainly you guys who play online)? How can I get better at this without going to tourney's? I'm kind of sick of losing.
So, the short version is, when you play, play
in your head.
You run at someone - instead of thinking "okay, i attack", think "I bet he'll spotdodge if I get too close, so I can probably catch him with a delayed attack or running behind and doing pivot grab"
When someone's knocked down, walk up to them and guess what they'll do. Do you think they'll do their get up attack? Then walk up and hold shield, then grab/whatever to punish them. If lag screws you up and you get hit, oh well. What matters is that you guess their move correctly.
Stuff like that is what you can apply to your gameplay to make you a better player in general. Just be sure you're aware of when things are legitimate reads or lag hits