Back to Unit 6

Unit 6 Website Development - Tutorial 2

2.25 Style buttons and links clearly

Make important actions obvious without hiding normal links.

What You Are Adding

Links should be recognisable and easy to use. Normal text links can stay underlined, while important calls to action can use a button-style class with padding, background colour and clear contrast.

CSS To Add To css/style.css

Add or adapt this CSS in the stylesheet you created in Tutorial 1. Keep the HTML structure from Tutorial 1 and use CSS to improve the presentation.

a {
    color: #173b93;
}

.button-link {
    display: inline-block;
    padding: 10px 16px;
    background-color: #365fd0;
    color: white;
    text-decoration: none;
    border-radius: 8px;
}

Expected Output

Normal text link

View timetable

Build It Yourself

  1. Open the same unit-6-website folder from Tutorial 1.
  2. Add or update the relevant HTML class names if this page uses classes.
  3. Add the CSS shown above to css/style.css.
  4. Save the stylesheet and refresh the website in the browser.
  5. Compare your page with the expected output preview.

Common Mistakes

Success Checklist