Tell us what’s happening:
hi, doing the business card lab. now not liking a couple of the elements. how to fix.
Your code so far
<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="styles.css" />
<meta charset="UTF-8">
<title>Digital Business Card</title>
</head>
<body>
<div class="business-card">
<img class="profile-image" src="https://cdn.freecodecamp.org/curriculum/labs/flower.jpg" alt="A vibrant flower in full bloom">
<img src="https://cdn.freecodecamp.org/curriculum/labs/flower.jpg" alt="A vibrant flower in full bloom />"
<p class="full-name">Marvin Hunkin</p>
<p class="designation">SoftwEare Developer</p>
<p class="company">@freeCodeCamp</p>
<hr>
<p>Email: hunkinmarvin5@gmail.com</p>
<p>Phone: (123) 456-789</p>
<hr>
<a href="">Portfolio</a>
<hr>
<div class="social-media">
<a href="https://www.twitter.com">Twitter</a>
<a href="https://www.linkedin.com">LinkedIn</a>
<a href="https://www.github.com">GitHub</a>
<h2>Connect with me</h2>
</div>
</div>
</body>
</html>
/* file: styles.css */
body {
background-color: rosybrown;
font-family: Arial, sans-serif;
}
p {
margin-top: 5px;
margin-bottom: 5px;
}
a {
text-decoration: none;
}
.business-card {
width: 300px;
background-color: lightgreen;
padding: 20px;
margin-top: 100px;
text-align: center;
font-size: 16px;
margin-left: auto;
margin-right: auto;
}
.profile-image {
max-width: 100%;
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36
Challenge Information:
Design a Business Card - Design a Business Card
https://www.freecodecamp.org/learn/full-stack-developer/lab-business-card/design-a-business-card`hi. okay well was able to then get the two editors. the css is fine. the couple of parts in the html, complaining about the p tags class element for full name and something else. so will paste the list of the test. did copy from the editor to visual studio code, and then copied from visual studio code back to the editor. so, what am i doing wrong. is there any extra characters or or any other things that jaws is not picking up. so will paste the error test list and my html. so only two errors in the html, no errors in the css. any help.
marvin.
ps: pasting below.
Menu
Profile
Instructions
index.htmlEditorstyles.cssEditor
ConsoleHide the previewPreviewMove the preview to a new window and focus it
Design a Business Card
Build an app that is functionally similar to this example project. Try not to copy the example project, give it your own personal style.
Fulfill the user stories below and get all the tests to pass to complete the lab.
User Stories:
- You should link the style sheet
styles.css
using thelink
tag in thehead
section of the HTML file. - Your page background should be
rosybrown
. The overall font should beArial
, with a fallback ofsans-serif
. - All of the
p
elements should have a top and bottommargin
of5px
. - All links on the page should not be underlined.
- You should have a
div
with aclass
attribute with a value ofbusiness-card
that will contain all the other elements. - The
.business-card
selector should have properties to set the element as300px
wide and a background color of your choice. Also you should set apadding
of20px
all around and a topmargin
of100px
. The text should be center aligned and the font size should be16px
. The left and right margins should be set toauto
. - Inside the
.business-card
element, there should be animg
element with aclass
attribute with a value ofprofile-image
. You can set the image source tohttps://cdn.freecodecamp.org/curriculum/labs/flower.jpg
if you like. There should be analt
with a meaningful description. - The
.profile-image
selector should have amax-width
property with a value of100%
. - Inside the
.business-card
element, after theimg
element, you should have threep
elements with aclass
attribute that has, respectively, a value offull-name
,designation
, andcompany
. - The first
p
element should contain your name. - The second
p
element should contain your designation. - The third
p
element should have your company name. - There should be an
hr
element below the thirdp
element. - After the
hr
element, there should be twop
elements. In the firstp
element, you should have an email address as the text. In the secondp
element, the text should be a phone number. After the twop
elements, there should be ana
element with the textPortfolio
linking to a valid URL. Add anhr
element after thea
element containing the portfolio link. - You should have another
div
element with aclass
attribute with a value ofsocial-media
. Within this element, there should be anh2
element with the textConnect with me
. - Inside the
.social-media
elements, there should be threea
elements. Thea
elements should have the textTwitter
,LinkedIn
andGitHub
respectively with links to valid websites.
Run the Tests (Ctrl + Enter)Reset this lesson
Get Help
Tests
-
Passed:1. Your
link
element should be within yourhead
element. -
Passed:2. Your
link
element should have arel
attribute with the valuestylesheet
. -
Passed:3. Your
link
element should have anhref
attribute with the valuestyles.css
. -
Passed:4. You should set the page background color in the
body
selector torosybrown
. -
Passed:5. You should set the page font to
Arial
in thebody
element with a fallback ofsans-serif
. -
Passed:6. Your
p
elements should have a top and bottommargin
of5px
. -
Passed:7. The links of the page should have no underline.
-
Passed:8. You should have one main
div
with aclass
attribute with a value ofbusiness-card
. -
Passed:9. Your
.business-card
selector should have awidth
property with a value of300px
. -
Passed:10. Your
.business-card
selector should have abackground-color
property with a valid color value. -
Passed:11. Your
.business-card
selector should have apadding
property with a value of20px
. -
Passed:12. Your
.business-card
selector should have a top margin of100px
. -
Passed:13. The text inside the
.business-card
element should be center-aligned. -
Passed:14. The font size of the text inside the
.business-card
element should be16px
. -
Passed:15. The left and right margins of the
.business-card
element should be set toauto
. -
Passed:16. Inside the
.business-card
element, there should be animg
element with aclass
attribute with a value ofprofile-image
. -
Passed:17. The image source should be set to a valid image.
-
Passed:18. The
alt
attribute of the image should be set to a meaningful description. -
Passed:19. Your
.profile-image
selector should have amax-width
property with a value of100%
. -
Failed:20. Inside the
.business-card
element, after theimg
element, there should be ap
element with aclass
attribute with a value offull-name
. -
Passed:21. After the
.full-name
element, there should be ap
element with aclass
attribute with a value ofdesignation
. -
Passed:22. After the
.designation
element, there should be ap
element with aclass
attribute with a value ofcompany
. -
Failed:23. The first
p
element, the one with class offull-name
, should contain your name. -
Passed:24. The second
p
element, the one with aclass
attribute ofdesignation
, should contain your designation. -
Passed:25. The third
p
element, the one with theclass
attribute with a value ofcompany
, should contain your company name. -
Passed:26. After the third
p
element, the one with theclass
attribute with a value ofcompany
, there should be anhr
element. -
Passed:27. After the first
hr
element, there should be ap
element with an email address as your text. -
Passed:28. After the email
p
element, there should be anotherp
element with a phone number as your text. -
Passed:29. After the phone number
p
element, there should be ana
element with the textPortfolio
-
Passed:30. Your portfolio
a
element should have a validhref
. -
Passed:31. After the
a
element containing your portfolio, there should be anotherhr
element as a divider. -
Passed:32. After the second
hr
element, there should be adiv
element with aclass
attribute with a value ofsocial-media
. -
Passed:33. Inside the
.social-media
element, there should be anh2
element with the textConnect with me
. -
Passed:34. Inside the
.social-media
element there should be threea
elements. -
Passed:35. The first
a
element should have the textTwitter
. -
Passed:36. The
href
of the firsta
element should point to a valid link. -
Passed:37. The second
a
element should have the textLinkedIn
. -
Passed:38. The
href
of the seconda
element should point to a valid link. -
Passed:39. The third
a
element should have the textGitHub
. -
Passed:40. The
href
of the thirda
element should point to a valid link.
24
25
26
27
28
29
com">LinkedIn
<a href="https:/
/www.github.
com">GitHub
Connect with
me
22
23
24
25
26
27
28
29
margin-left: auto;
margin-right: auto;
}
.
profile-image {
max-width: 100%;
}
// running tests 20. Inside the
.business-card
element, after the
img
element, there should be a
p
element with a
class
attribute with a value of
full-name
. 23. The first
p
element, the one with class of
full-name
, should contain your name. // tests completed
Navigated to Design a Business Card
Digital Business Card `