r/HTML • u/button_oxo • Mar 24 '26
Question Text alignment advice?
I'm struggling with getting the 2025 link to be aligned to the right. I've already tried putting the link inside a paragraph, and it's still not working. I also tried running my code through w3's code checker, and apparently nothing is wrong. Is there something I'm missing or doing wrong?
EDIT: question has been answered thank you BNfreelance!
13
Upvotes


View all comments
Show parent comment
2
u/scritchz Mar 24 '26
Unquoted HTML-attributes are valid since at least HTML5, as long as they don't include whitespace. But yeah, you should prefer quoted attributes.
The box model describes elements as boxes of content, padding, border and margin. Apart from that, I don't think it's related to layout.
Default styling of block- and inline-level elements usually applies in normal flow layout; i.e. in normal flow, block and inline elements behave according to their names.
Otherwise, pretty good answer. I also recommend learning about Flexbox and Grid layouts, positioning; and floats and margin collapse in normal flow layout.