Ideas
🤔💭
Change the Font
In the starter project, there are a lot of fonts imported into the site. Open the style.css file to see the code that does that - there is a big list of fonts at the bottom of the file!
Setting Up
If you're using a previous project and you don't have the right code, copy this code to the top of your style.css file:
@import url('https://fonts.googleapis.com/css2?family=Bonheur+Royale&family=Butterfly+Kids&family=Dancing+Script:wght@400..700&family=Honk&family=Lacquer&family=Limelight&family=Oswald&family=Pirata+One&family=Single+Day&family=Slackey&family=Workbench&family=Yarndings+12&display=swap');
Then, you can replace the font name after font-family
with one of these fonts, like this:
body {
/* ... */
font-family: "Workbench";
/* ... */
}
Full List of Fonts
Add Pictures
Create a whole gallery of pictures on your website. See if you can add up to five more pictures to the bottom of your page! An image looks like this:
<img src="REPLACETHISWITHAURLFORAPICTURE">
The thing that goes in between the quotation marks should be a URL for your picture. You should choose "Copy image URL" to make sure you have it, then paste it into your code between the quotation marks.
Add a Story
Add a lot more text, using <p>
elements. You can tell a story, or you can share more about the topic of your site. It could look something like this:
<p>This is one line of my story. It's kind of long, but not too long.</p>
<p>This is another line, because it's in its own paragraph element.</p>
<p>This is the third line.</p>
Create a Gradient Background or a Background Image
Currently, the background of the website is just a solid color. But it can be a gradient color, or even an image!
Background Gradient
Luckily, there is a website that generates CSS code for gradients.
- Open a new tab and go to cssgradient.io
- Play around with the color selection tools to find a nice gradient to use
- Select different colors for each point on the line
- Change angles or gradient type
- Add new color points
- Do whatever makes it look the best!
- Once a good gradient is found, scroll down a bit to the CSS section
- Click the "Copy to Clipboard" button at the bottom of the CSS box
- Go back to the code, and open the style.css file for editing
- Within the
body
rule, (between{
and}
), paste the code (starting withbackground
) - Save the project to see the background change!
body {
background: rgb(34,193,195);
background: linear-gradient(163deg, rgba(34,193,195,1) 0%, rgba(104,191,147,1) 10%, rgba(101,175,65,1) 40%, rgba(253,240,45,1) 100%);
}
Background Image
It is also possible to give the page a background image.
- Find an image online
- Copy the image address
- Open the style.css file
- Remove the value for the
background
property - Replace the value with
url("")
- Inside the quotes, paste the image address
- Save the project to see the background change!
body {
background: url("https://cdn.wallpaperhub.app/cloudcache/6/9/0/e/e/f/690eefe3ba1f553e0ea527f51ee407b604b681b4.jpg");
}
CSS: Header Text Shadow
Another neat CSS trick is to add text shadow. For this example, add text shadow only to the h1
header.
- In the style.css file, make a new line at the very bottom under everything
- Create a new rule for the top header by adding
h1
and{
- This will mean that all styles apply to each
h1
HTML element
- This will mean that all styles apply to each
- Make a new line, and press space a couple times
- There, add a new property:
text-shadow: red -1px 1px
- Make another new line, and add the closing
}
curly bracket - Save the project to see the shadow!
- Update the numbers and the color to see how it changes the effect
h1 {
text-shadow: red -1px 1px;
}
CSS: Change Text Color on Hover
To make the website feel a bit more 🌟 i n t e r a c t i v e 🌟, update the styles when hovering over certain elements on the page!
- In the style.css file, create a new rule for
p
at the bottom of the file- The styles in this rule will only affect
p
elements
- The styles in this rule will only affect
- Add the
color
property with a value oforange
- Notice that the text color changed
- Update the beginning part so that instead of
p
, it isp:hover
- This means the styles will only apply when the user hovers over the
p
elements
- This means the styles will only apply when the user hovers over the
- Save the project, and hover over the list items to see them change!
- Update the values to change the effect
p:hover {
color: orange;
}