Can you mix HTML/CSS Syntax?

Can you mix the format for HTML/CSS syntax?

<label for="input1">Enter a date:</label>
<input type="date" id="input1" name="input1">

For an example, can you switch “id” and “name” to be before “type”? Or does it have to to be the format of type, id/class, and name?

there is not a required order for element attributes
note that there is no css in the code you posted

attributes of html tags have no specified order

1 Like

oh okay thank you so much!