Can the name of html code be anything? here is the example:
<input id="indoor" type="radio" name="indoor-outdoor">indoor
Can “label” here be changed to literally any text like a variable in Python?
<p>Click here to view more <a href="#">cat photos</a>.</p>
Can “p” and “a” be named literally to any text like a variable in Python?an
no. HTML have only the tags that are defined. you can try to rename those tags and see, it will not work.
No, they aren’t variables. They are specific names that mean different things so that the browser can take them and render a page. You can’t just give them arbitrary names, that defeats the point.
Technically you can name them anything you like, but that’s pointless as [normally] the browser will recognise that they aren’t correct, that it doesn’t understand what they are, and turn them into a
<div> tag. You can also create new elements using a browser API called Web Components. In that case the have to be named with a hyphen, like
oh okay, thank you so much, I recently came from Python, that’s why I got confused, thanks!