If you select boards with knots, there is a good chance that they will bleed through, even if you use a sealer or shellac based primer. The resins in knots is persistent.
Clear boards are usually used for moldings, including baseboards. You could also use MDF (medium density fiberboard) or solid vinyl composite molding. When painted, they are hard to distinguish from wood in most applications. (I think they look a little too smooth and I prefer wood). For painted applications, there is also fingerjoint molding, which is made of interlocked short pieces and is cheaper than clear boards. Much pre-primed molding is fingerjoint. Occasionally these joints may show if the quality is not high.
For wood or MDF, a light sanding with 120 grit paper is recommended to remove milling glaze and to give the wood a tooth to better take paint. An orbital sander is fine
Then prime and paint. Many prefer oil based primer on raw wood and MDF. Some vinyl says it can be painted directly, but I would also give it a sanding (or avoid it unless necessary, such as in outdoor uses).
Latex paint is fine for a finish coat, but it tends to look less smooth than oil (alkyd) based finishes. Adding a leveling agent like Floetrol helps, but nothing lays as smooth as a good oil based enamel.
(P.S. To me, using a really smooth straight clear board, in furniture or in molding, is appreciating and honoring the wood, the tree, nature. But to each his/her own.)
Latex paints have a known attribute that allows certain things to persistently come through the paint even though you try applying multiple layers.
I once had a problem of a wall that had a poster glued to it by a previous owner. I removed the poster and apparently the glue residue, however small it was, kept changing the paint I applied over that area.
Another time I was trying to paint a door that had been finished with an oil based product. I had worked diligently to strip and sand off the old finish before painting. Unfortunately the old finish had penetrated the wood to varying degrees in different spots. The paint I applied to the door was not uniform even after four or five coats - hard to remember exactly how many as it was 25 years ago.
The fix for both of these problems is to apply a sealer / primer product like Kilz before applying the final paint. One needs to make sure the surface is properly prepared before applying the sealer / primer. Light sanding can help and washing with a strong solution of hot water and TSP can help.
Best Answer
A Shellac based primer is what you need this will normally seal in 1 coat. The 2 main types I can think of are kilz and zinser these stop the bleeding through. I have found this is the only way to go for freshly milled wood, covering things like smoke stained surfaces that cleaners like Tri sodium phosphate won’t remove. A good coat of shellac primer and then even white won’t show or that has been my experience. I don’t work for or have any interest in either company I have used there products successfully for many years after having similar results with regular primer.