Are the stair going to be pull-down or permanent? Pull-down stairs come in a couple of different 'styles'. There are folding stairs and there are sliding/gliding/stair-ladders.
If we're talking about traditional stairs that are the same type that go from the 1st floor to the 2nd floor, then the answer depends. Rise and Run need to be taken into account. From there, you'll get your 'numbers' and will be able to determine if they're 'legal'. As for meeting building code, you MAY need a permit, hence, an Inspection. And also, if the attic is in a residential vs. a home (per one you live in vs. a business that's in a home), the code may be different.
One WEB site that talks about building stairs is at How To Build Stairs. There are books out there too which you may want to invest in. Since you're doing this yourself, spend some of that SAVED $$$ on some good references. One reference, How To Build Stairs Training Guide looks interesting. Before you buy, ctc them to be sure that what they offer will 'fit' your situation.
A professional link on stairs is at Stairs.com. (They talk about stairs, of course, as well as building codes. I'll leave the latter to you ...) Another interesting reference can be found at Dave's Stairs. It looks useful.
Other than all this, I haven't much else to offer at this time. Perhaps others will add to your post. Stay tuned! My best to ya and hope this helps.