id
needs to be unique within that web page/html document, and any kind of element can have an id (afaik?)
label
with an input
, they still can’t share the same id
! one of them is always gonna use a separate attribute like for
to reference the id
of the other.div
has no height or width, which is why it’s basically invisible—how should the browser know how big to make it?? it’ll show up when you either specify height and width, or put any content inside the div, in which case it makes the div whatever dimensions are needed to hold the contenttype=text
for input
) would still work without the quotes, but they’re just recommended to always be included? anyway it sounds like at the very least you can’t go WRONG with always including them.id
is one of them, it should always go first (that’s just me making that up though lol)the stuff that doesn’t get displayed on the page.
meta
element can maybe only have one attribute? like, you need to add two separate meta elements to declare charset
in one and viewport
in the other
<html>
<head></head>
<body>
<header>
<h1></h1>
<nav></nav>
</header>
<main>
<section>
<article></article>
</section>
</main>
<footer></footer>
</body>
</html>
h1
, for the title of the page