For IT industry, there are three main ways I can think to do this:
For all of them I recommend just adding a URL link to your CV in an appropriate place. The link can be followed from a digital copy of the CV.
Create a Github account
For a recent graduate, this is what I'd recommend.
You probably should be using Github or some kind of other version control for your programming projects anyway.
Github portfolios are a recommended a lot of hirers in the IT industry.
Create an account, and use it to implement a project. You have entire creative freedom for what you do with the project, so have fun with it.
The project doesn't need to be anything spectacular or groundbreaking. They're not so much interested in what the project does, as to the quality of your code, and the demonstration of your ability.
Here's a few ideas of what you can do on a Github project:
- Solve some problems at Project Euler or Code Chef
- Implement a simple game like Pacman or Space Invaders.
- Implement several small code snippets, and demonstrate their use (eg data structures, design patterns, etc).
- Implement a project that you're really interested in. Go nuts.
Regarding adding this to your CV, a URL link on your CV to the Github repo is enough. The hiring team can easily enough click or copy paste from a digital copy, and view your code in a browser.
In terms of where this fits on your CV, it depends on context/your CV style.
Personally, I have a section called 'Sample Work', and list three projects with their Github links, and a two-three sentence summary of what the project is about, and what relevant skills/capabilities it demonstrates.
If you have multiple projects on your Github account, it's a good idea explicitly outline what they're about, and what they feature, rather than simply posting a link to your profile and saying 'Look for yourself'.
Create a website/blog
You can create a blog post coding tutorials or share other IT news that you find interesting. Tutorials demonstrate technical skill and communication skills. News stories demonstrate passion.
Or, if you have web development skills, and that's what you're wanting to do, then creating a website from scratch and showing it off showcases these skills.
Again, the hiring team can easily access your website and view your work.
The website can linked underneath your name on your CV header, or in a 'Sample Work' section.
Link to your Stack Overflow account
You can make an effort to go through on Stack Overflow and answer questions, build reputation. As you're a recent graduate, you might find it hard to find questions to answer, but prove me wrong.
A link to the Stack Overflow account can be put into your CV, somewhere relevant.
All of these things put you ahead of the pack. So long as what you're creating is sensible and professional, the hiring team will see that you're a motivated valuable developer.