CSS - Excercise #1
1. Add some styles
We’ll spend the next ten minutes on the following:
- Open your index.html file.
- Add a
<style>
tag inside the <head>
tag.
- Try out the following properties on your other elements. (linked for reference)
- background-color
- border
- font-size
- font-weight
- text-align
- text-decoration
- margin
- padding
- width
- height
Here’s a completed version of the above exercise.
2. Include CSS File
- Include the css file inside the
<head>
tag of your index.html file. <link rel="stylesheet" src="style.css" />
- Add the styles from above to the new style.css file. Make sure you remove the
<style>
tag.
- When you refresh the index.html page, the styles should stay the same.