I just completed the first project in the HTML/CSS portion of the curriculum. I was just looking on some feedback on what I could have done better and what I did well.
Thanks!
Note: I did use alot of google on parts of the css code so I particularly want to know any un-needed code I have included.
Thanks again!
Here is the HTML
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" type="text/css" href="styles.css">
<title>LSU Fan Form
</title>
<meta charset="utf-8">
</head>
<body>
<div class="container">
<header class="header">
<h1 id="title" class="text-center">2023 LSU
Fan Form</h1>
<p id="description" class="description text-center">
Let us know who you are and how you think the Tigers will do this season!
</p>
</header>
<form id="survey-form">
<div class="form-group">
<label id="name-label" for="name">Name</label>
<input
type="text"
name="name"
id="name"
class="form-control"
placeholder="Enter your name"
required
/>
</div>
<div class="form-group">
<label id="email-label" for="email">Email</label>
<input
type="email"
name="email"
id="email"
class="form-control"
placeholder="Enter your Email"
required
/>
</div>
<div class="form-group">
<label id="number-label" for="number"
>Age<span class="clue">(optional)</span></label
>
<input
type="number"
name="age"
id="number"
min="10"
max="99"
class="form-control"
placeholder="Age"
/>
</div>
<div class="form-group">
<p>Where do you cheer on the Tigers from?</p>
<select id="dropdown" name="state" class="form-control" required>
<option disabled selected value>Select current State</option>
<option value="AL">Alabama</option>
<option value="AK">Alaska</option>
<option value="AZ">Arizona</option>
<option value="AR">Arkansas</option>
<option value="CA">California</option>
<option value="CO">Colorado</option>
<option value="CT">Connecticut</option>
<option value="DE">Delaware</option>
<option value="DC">District Of Columbia</option>
<option value="FL">Florida</option>
<option value="GA">Georgia</option>
<option value="HI">Hawaii</option>
<option value="ID">Idaho</option>
<option value="IL">Illinois</option>
<option value="IN">Indiana</option>
<option value="IA">Iowa</option>
<option value="KS">Kansas</option>
<option value="KY">Kentucky</option>
<option value="LA">Louisiana</option>
<option value="ME">Maine</option>
<option value="MD">Maryland</option>
<option value="MA">Massachusetts</option>
<option value="MI">Michigan</option>
<option value="MN">Minnesota</option>
<option value="MS">Mississippi</option>
<option value="MO">Missouri</option>
<option value="MT">Montana</option>
<option value="NE">Nebraska</option>
<option value="NV">Nevada</option>
<option value="NH">New Hampshire</option>
<option value="NJ">New Jersey</option>
<option value="NM">New Mexico</option>
<option value="NY">New York</option>
<option value="NC">North Carolina</option>
<option value="ND">North Dakota</option>
<option value="OH">Ohio</option>
<option value="OK">Oklahoma</option>
<option value="OR">Oregon</option>
<option value="PA">Pennsylvania</option>
<option value="RI">Rhode Island</option>
<option value="SC">South Carolina</option>
<option value="SD">South Dakota</option>
<option value="TN">Tennessee</option>
<option value="TX">Texas</option>
<option value="UT">Utah</option>
<option value="VT">Vermont</option>
<option value="VA">Virginia</option>
<option value="WA">Washington</option>
<option value="WV">West Virginia</option>
<option value="WI">Wisconsin</option>
<option value="WY">Wyoming</option>
</select>
</div>
<div class="form-group">
<p>How will the Tigers fare this year?</p>
<label>
<input
name="season"
value="They won't win a single game"
type="radio"
class="input-radio"
checked/>
They won't win a single game</label
>
<label>
<input
name="season"
value="Building season not too well"
type="radio"
class="input-radio"/>
Building season (not too well)</label
>
<label>
<input
name="season"
value="They'll win the SEC!"
type="radio"
class="input-radio"/>
They'll win the SEC!</label
>
<label>
<input
name="season"
value="WE'RE GOING ALL THE WAY"
type="radio"
class="input-radio"/>
WE'RE GOING ALL THE WAY!!</label
>
</div>
<div class="form-group">
<p>What games will be the toughest?
</p>
<select id="struggle" name="struggle" class="form-control" required>
<option disabled selected value>Select an option</option>
<option value="challenges">Florida-State</option>
<option value="projects">Mississippi State</option>
<option value="community">Ole-Miss</option>
<option value="openSource">Auburn</option>
<option value="openSource">Arkansas
</option>
<option value="openSource">Alabama</option>
</select>
</div>
<div class="form-group">
<p>
What would you like to see improved with the Tigers this year?
<span class="clue">(Check all that apply)</span>
</p>
<label
><input
name="prefer"
value="passing"
type="checkbox"
class="input-checkbox"
/>Passing offense</label
>
<label>
<input
name="prefer"
value="run"
type="checkbox"
class="input-checkbox"
/>Run game</label
>
<label
><input
name="prefer"
value="pass defense"
type="checkbox"
class="input-checkbox"
/>Pass defense</label
>
<label
><input
name="prefer"
value="coaching"
type="checkbox"
class="input-checkbox"
/>Coaching</label
>
<label
><input
name="prefer"
value="LoSO"
type="checkbox"
class="input-checkbox"
/>Line of scrimmage (offense)</label
>
<label
><input
name="prefer"
value="LoSD"
type="checkbox"
class="input-checkbox"
/>Line of scrimmage (deffense)</label
>
<label
><input
name="prefer"
value="special-teams"
type="checkbox"
class="input-checkbox"
/>Special Teams</label>
</div>
<div class="form-group">
<p>Any additional comments on the Tigers this year?</p>
<textarea
id="comments"
class="input-textarea"
name="comment"
placeholder="Enter your comment here..."
></textarea>
</div>
<div class="form-group">
<button type="submit" id="submit" class="submit-button">
Submit
</button>
</div>
</form>
</div>
</body>
</html>
And here is the CSS
@import url('https://fonts.googleapis.com/css?family=Poppins:200i,400&display=swap');
:root {
--color-white: #f3f3f3;
--color-darkblue: #1b1b32;
--color-darkblue-alpha: rgba(53, 17, 49, 0.8);
--color-gold: #e6c509;
}
body {
font-family: 'Poppins', sans-serif;
font-size: 1.2rem;
font-weight: 400;
line-height: 1.4;
color: gold;
opacity: 90%;
}
/* mobile friendly alternative to using background-attachment: fixed */
body::before {
content: '';
position: fixed;
top: 0;
left: 0;
height: 100%;
width: 100%;
z-index: -1;
background-image: url("https://lsusports.net/imgproxy/CbcXgUHdYDxr9tmzeAGvkkwzoNM0yo8zIPuKorGR5fw/fit/3840/2160/ce/0/aHR0cHM6Ly9zdG9yYWdlLmdvb2dsZWFwaXMuY29tL2xzdXNwb3J0cy1jb20vMjAyMS8xMC8yNzE1YWJiMS1zdGFkaXVtXzMxOTYuanBn.png");
background-repeat: no-repeat;
background-position: center;
}
h1 {
font-weight: 400;
line-height: 1.2;
}
p {
font-size: 1.125rem;
}
h1,
p {
margin-top: 0;
margin-bottom: 0.5rem;
}
label {
display: flex;
align-items: center;
font-size: 1.125rem;
margin-bottom: 0.5rem;
}
input,
button,
select,
textarea {
margin: 0;
font-family: inherit;
font-size: inherit;
line-height: inherit;
}
button {
border: none;
}
.container {
width: 100%;
margin: 3.125rem auto 0 auto;
}
@media (min-width: 576px) {
.container {
max-width: 540px;
}
}
@media (min-width: 768px) {
.container {
max-width: 720px;
}
}
.header {
padding: 0 0.625rem;
margin-bottom: 1.875rem;
}
.description {
font-style: italic;
font-weight: 200;
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.4);
}
.clue {
margin-left: 0.25rem;
font-size: 0.9rem;
color: gold;
}
.text-center {
text-align: center;
}
/* form */
form {
background: var(--color-darkblue-alpha);
padding: 2.5rem 0.625rem;
border-radius: 0.25rem;
border-color: gold;
}
@media (min-width: 480px) {
form {
padding: 2.5rem;
}
}
.form-group {
margin: 0 auto 1.25rem auto;
padding: 0.25rem;
}
.form-control {
display: block;
width: 100%;
height: 2.375rem;
padding: 0.375rem 0.75rem;
color: #495057;
background-color: #fff;
background-clip: padding-box;
border: 1px solid #ced4da;
border-radius: 0.25rem;
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
.form-control:focus {
border-color: gold;
outline: 0;
box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}
.input-radio,
.input-checkbox {
display: inline-block;
margin-right: 0.625rem;
min-height: 1.25rem;
min-width: 1.25rem;
}
.input-textarea {
min-height: 120px;
width: 100%;
padding: 0.625rem;
resize: vertical;
}
.submit-button {
display: block;
width: 100%;
padding: 0.75rem;
background-color: #a4508b;
color: inherit;
border-radius: 2px;
cursor: pointer;
}