Sowing inside in January or February under growing lights then transplanting to the garden in early spring is the only way that I can grow onions from seed and have them mature in my zone 5 garden. If you live in more southern areas, you can plant onion seeds in late summer to early fall, overwinter, and they will begin growing when the weather warms.
You can get at least an 8 - 12 week headstart on the outdoor onion growing season by starting your onion seeds under a T5 fluorescent grow light. Obviously, starting onions from seed rather than starting from bulbs requires a little extra time anyway. In colder areas in the northern hemisphere you can get started in December (hey it gives you something to do over the winter months) to have seedlings ready to transplant into the garden in early Spring. You can also get Japanese (overwintering) varieties started in August when the intense heat in warmer areas can make starting seedlings difficult.
Any standard seedling potting mix is fine. Avoid anything with too much nitrogen at first - your onions only require lots of this later! For the first few weeks it's all about roots and starting to build a bulb. I like to mix in some vermiculite (1 part vermiculite, 4 parts potting mix) as this aids in nutrient and moisture retention. Fill flats or cell trays with a well moistened mix - it should be quite wet without being sludge - sprinkle seeds generously and top off with a quarter inch of wet vermiculite. The top layer of wet vermiculite is like a duvet for the seeds - it keeps moisture and temperature levels constant and certainly increases germination rates.
Find a cool spot in your house like a basement or garage. Use a propagator lid on top of your cell tray or flat to help raise relative humidity levels. Lift it once each day for a quick visual inspection. Onion germination is most fast and reliable in the low 70s fahrenheit. A commonly accepted range is 68-75°F (20-24°C). Use a heat mat to keep the bottom of your propagator but discontinue use once the majority of the viable seeds appear to have sprouted.
As a general rule of thumb, you should set your T5 fluorescent grow lights on to 12 hours a day to start onion seeds. Keep your T5 fluorescent grow light raised up at least a foot or so above the propagator - monitor temperatures inside the propgator using a min/max thermometer with a remote probe. Don't let it get too warm in there! If temperatures are higher than the mid 70s, try raising your lights or discontinuing use of your heat mat.