HTML rules we tend to forget!

Hi, guys. While I was using HTML to code, while inside form tags, I was using many label elements to create radio and check box elements, they all started to appear like a paragraph, continuously. I want every one of them in each line, so how do I do it? Is there might be a typo? or are there any tags or attributes for that?

1 Like

Hi @antonwyclef

The input and label elements are inline elements so they ocuppied as many size as its content needs. They behave like words, no boxes (neither paragraphs).
You can turn off your css styles and see how they are displayed, you might need to change something in your CSS or may be label has a lot of contain. Not sure what is happening without seing your code.
You may want to use display: inline-block (behave like words but you can style top and bottom), min-content , max-content, or even block, flex or grid to style then.
I hope that give you some ideas. Sorry I couldn’t help you more.
Happy coding!!

1 Like

I used br to break them to each line. Thank by the way.

That’s not a good use of br - use css for spacing


ok, thanks
Like display:inline-block ?

that could be an example, yes

1 Like