2024-05-13 | 09:09:08 PM
Heya. It’s been an ‘okay’ day so far. Time to go code. I’ll make progress on my certification project, which I started yesterday.
Link to originalThe certification project:
2024-05-13 | 10:22:19 PM
Hi there. It’s a slow day today. I’ve been experiencing a few pains here and there in my body so I’m taking it slow. The code of myproject is extremely messy at this point, but it’s important that I properly document my learning process, so here’s an honest update:
Honestly, let me put the code here, just so I can refer to it in the future, if I want:
HTML
<!DOCTYPE html>
<html lang="en">
<link rel="stylesheet" href="./styles.css">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title id="title">My Little Website</title>
</head>
<body>
<h1>My Little Website</h1>
<p id="description">
This website is something I'm making for FreeCodeCamp.
I'm thinking it could be something related to my <i>own</i> website,
<a href="https://ianaquino.xyz/">Alexander's Thoughts.</a>
<form id="survey-form">
<fieldset id="form-one">
<label for="name-label"> Name
<input id="name-label" type="text" placeholder="John Doe">
</label>
<label for="email-label"> Email
<input id="email-label" type="text" placeholder="johndoe@gmail.com" pattern="[a-z0-9._%+\-]+@[a-z0-9.\-]+\.[a-z]{2,}$">
</label>
</fieldset>
<fieldset class="form-two">
<label for="number-label">How many notes have read in my website?
<input id="number-label" type="number" pattern="1-9" min="0" max="500" placeholder="0-500">
</label>
<label for="dropdown"> Are you happy with how my website looks?
<input id="dropdown">
<select id="options">
<option>Yes</option>
<option>No</option>
<option>Maybe</option>
</select>
</label>
</fieldset>
<fieldset class="form-three">
<label>Which do you prefer to go to when you want to know more about my life?
<div>
<input id="radio-label-1" type="radio" value="Social Media">
<label for="radio-label-1">Social Media</label>
</div>
<div>
<input id="radio-label-2" type="radio" value="Social Media">
<label for="radio-label-2">Website</label>
</div>
</label>
</fieldset>
<fieldset>
<label id="checkboxes">Which ones have you seen in my website?
<input type="checkbox" value="dailies" id="dailies" value="dailies">
<label for="dailies">Dailies</label>
<input type="checkbox" value="idea-dump" id="idea-dump" value="idea-dump">
<label for="idea-dump">Idea Dump</label>
</fieldset>
<fieldset class="form-four">
<label for="comment"> Do you have anything to say to me? Please write them below.
<textarea name="comment">
</textarea>
</label>
</fieldset>
<input type="submit" name="press-me" value="Press me!" id="press-me" id="submit">
</form>
</p>
</body>
</head>
</html>
<!---
User Stories:
✅ You should have a page title in an h1 element with an id of title
✅ You should have a short explanation in a p element with an id of description
✅ You should have a form element with an id of survey-form
✅ Inside the form element, you are required to enter your name in an input field that has an id of name and a type of text
✅ Inside the form element, you are required to enter your email in an input field that has an id of email
✅ If you enter an email that is not formatted correctly, you will see an HTML5 validation error
✅ Inside the form, you can enter a number in an input field that has an id of number
✅ The number input should not accept non-numbers, either by preventing you from typing them or by showing an HTML5 validation error (depending on your browser).
✅ If you enter numbers outside the range of the number input, which are defined by the min and max attributes, you will see an HTML5 validation error
✅ For the name, email, and number input fields, you can see corresponding label elements in the form, that describe the purpose of each field with the following ids: id="name-label", id="email-label", and id="number-label"
✅ For the name, email, and number input fields, you can see placeholder text that gives a description or instructions for each field
✅ Inside the form element, you should have a select dropdown element with an id of dropdown and at least two options to choose from
✅ Inside the form element, you can select an option from a group of at least two radio buttons that are grouped using the name attribute
✅ Inside the form element, you can select several fields from a series of checkboxes, each of which must have a value attribute
✅ Inside the form element, you are presented with a textarea for additional comments
Inside the form element, you are presented with a button with id of submit to submit all the inputs
Fulfill the user stories and pass all the tests below to complete this project. Give it your own personal style. Happy Coding!
Note: Be sure to add <link rel="stylesheet" href="styles.css"> in your HTML to link your stylesheet and apply your CSS
-->
CSS
h1 {
text-align: center;
}
body {
max-width: 800px;
margin: 0 auto;
background-color: #FFF0CC;
}
textarea {
display: block;
margin: 2vh auto;
}
#press-me {
display: block;
margin: 2vh auto;
}#description {
padding-top: 0;
padding-bottom: 3.3vh;
max-width: 60vh;
margin: 0 auto;
}
h1 {
padding-bottom: 0;
padding-top: 0;
padding-left: 0;
padding-right: 0;
}
fieldset {
padding: 2vh;
margin: 0 auto;
}
#number-label {
display: block;
margin: 0 auto;
}
label {
display: inline-block;
margin: 0 auto;
padding-bottom: 1vh;
}
2024-05-13 | 10:28:20 PM
All in all, it’s still really messy, and I know a lot of the shit I wrote there are wrong. What’s important is that I’m documenting my journey honestly. I’ll fiddle with it again tomorrow. No new thing to be added to my CSS or HTML contexts today. I’ll see you soon.