#Code Review

3 messages · Page 1 of 1 (latest)

tulip cloud
#

Hello, I am going through the "Learn HTML and CSS" course and I just completed my first solo project: 'The Daily Dribble'. I was hoping someone from the community would be able to give me a code review and tell me where I could improve and what can be refined. Thank you in advance for you help

https://scrimba.com/s04jpi8/s0q8j3mdfg/head

p.s. -> I have never sent a scrim, so if the given link does not work. Please let me know and tell me how to properly send one. Thanks

median spire
#

I think the button and text could have better padding. And you can center the whole thing using margin:auto; Most of the fe improvments generally are design based as well.

worldly stream
#

Dont forget the alt attribute on your image! It can be empty but it has to be there. Also, while input[type=text] technically works, type=email is more semantic and offers you some build in validation by the browser.

This is the very first project so you will learn this as I dont think this was covered but you would want to put your input and button into a <form>. Then the button will by default be a type=submit.

Also, classes are there to be reusable. This is a common issue and naming in frontend is HARD. Instead of naming "description" or "terms", I would recommend not giving the "description" a class at all. Auditing your css, youre declaring the same color on multiple selectors #121212. Take advantage of inheritance by setting the most common fonr properties on the bottom that will cover the majority.

body {
  color: #121212;
  font-size: 1rem;
  line-height: 1.6; 
} 

<h1> and <p> elements are display: block by default. So that only needs to be applied tobyour inage and is commonly part of the css reset

*, *::before, *::after {
  box-sizing: border-box;
}

img {
  display: block; 
  max-width: 100%; 
}