Project ยท 20 min
Project: profile card
The goal
Build a profile card for a trail guide named Mira Cole. You will use the elements and the CSS from the lessons so far. There are no new ideas in this lesson. Work through the eight tasks in order. The first four tasks write the HTML. The last four tasks write the CSS.
The card will have this structure:
card
picture
name (h1)
role (p)
skills (ul)
email link (a)
The picture
The preview cannot load pictures from other websites. Use this small portrait as the src of your img:
data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Crect width='100' height='100' fill='%23fde68a'/%3E%3Ccircle cx='50' cy='38' r='18' fill='%23b45309'/%3E%3Cpath d='M16 100C16 70 84 70 84 100Z' fill='%23b45309'/%3E%3C/svg%3E
After the tasks
When all tasks pass, make the card yours. Change the name, the colors, and the skills. Try flex-direction: row, or add a second card. The checks only look at the parts that the tasks name, so you can change anything else.
Tasks
8 to do
Task 1, not checked yet. Make a
divwith the classcard. Inside it, add anh1with the textMira Cole, then apwith the classroleand the textTrail guide.Task 2, not checked yet. Add a picture as the first thing in the card. Use the
srcaddress from the lesson text. SetalttoPortrait of Mira Cole.Task 3, not checked yet. After the role, add a list with the
ulelement. It has three skills:Maps,First aid,Birdsong.Task 4, not checked yet. At the end of the card, add a link with the text
Email Mira. It goes tomailto:mira@example.com.Task 5, not checked yet. Style the card box. Give
.cardawidthof320px,paddingof24px,background-colorof#f1f5f9,border-radiusof16px, andbox-sizingofborder-box.Task 6, not checked yet. Center the text in the card. Make the picture round and 96px wide: set
widthto96pxandborder-radiusto50%on.card img.Task 7, not checked yet. Arrange the parts of the card in a centered column. On
.card, setdisplaytoflex,flex-directiontocolumn,align-itemstocenter, andgapto12px.Task 8, not checked yet. Make the link look like a button. On
.card a, setbackground-colorto#1d4ed8,colorto#ffffff,paddingto8px 16px,border-radiusto8px, andtext-decorationtonone.
Task 1 of 8
Make a div with the class card. Inside it, add an h1 with the text Mira Cole, then a p with the class role and the text Trail guide.