notes from https://www.freecodecamp.org/learn/2022/responsive-web-design/learn-html-by-building-a-cat-photo-app/ steps 34 onward
(and also https://www.freecodecamp.org/learn/2022/responsive-web-design/#learn-html-forms-by-building-a-registration-form)
<input> is self-closing, and the default type is text<textarea> is not self-closing<input> or a <button>
action attribute.” (but of course it’s better to be explicit than to rely on defaults.)input element with a type of submit is automatically set to submit its nearest parent form element.”name and value attributes. Since your radio buttons do not have a value attribute, the form data will include [name]=on, which is not useful when you have multiple buttons.”<form action="/submit-form-here">
<fieldset>
<legend>Is your cat an indoor or outdoor cat?</legend>
<label><input id="indoor" type="radio" name="indoor-outdoor" value="indoor"> Indoor</label>
<label><input id="outdoor" type="radio" name="indoor-outdoor" value="outdoor"> Outdoor</label>
</fieldset>
<input type="text" placeholder="cat photo URL" name="catphotourl">
<button type="submit">Submit</button>
</form>
input attributes<label for="1">Pick one</label>
<select id="1">
<option>yellow</option>
<option>red</option>
</select>
select makes a dropdown menuoption doesn’t need its own label--the “label” is the text that’s already inside the tags, so it’s already inherently associated
input elements DO need labels is that they’re self-closing and thus you can’t put their associated text inside themapparently value doesn’t strictly need to be provided for checkboxes. if it’s not provided, then what value would it default to on the backend? (in the sense that with the one example, for a radio button with name="indoor-outdoor", the default value if either of the radio buttons was clicked would be indoor-outdoor=on.
cat photo app step 68 says “One more thing. You should allow people to use their native language. Tell the browser to encode multiple languages by adding a meta element as a child of the head element. Set its charset attribute to UTF-8.” but in what way does this allow people to use their native language?
jess mentioned she would bring up some things about how the web works or how browsers work but she didnt end up mentioning that as far a si could tell… does she have links or recs to learn more about that?