0

Block and Inline level HTML elements

I wanted to know which of the existing elements in HTML are block level and inline. We know that block-level elements occupy the entire available width and start a new line (For example, we have the tag<ul> It is<p></p> ). Inline level elements occupy all the width that is necessary, therefore, these elements do not start on a new line (Examples include<button></button> ). Not only these examples I mentioned, but I wanted to know which of the various HTML elements are blocks and inline. Thank you in advance:D

8th Jan 2024, 1:05 AM
José Vitor
José Vitor - avatar
3 Answers
+ 3
Hey José Vitor When you're learning, a cool skill for coding is knowing how to search effectively. I found a webpage on W3Schools that talks about different types of HTML elements, both block and inline. It's like a cheat sheet for HTML. Check it out here: HTML Block and Inline Elements. https://www.w3schools.com/htmL/html_blocks.asp Happy learning!
11th Jan 2024, 6:11 PM
Chris Coder
Chris Coder - avatar
+ 1
Inline-block elements are what should be blocks and are inline, in CSS adding display:inline to a block element will make it disappear (I think), that's why it is advisable to use display:inline-block I don't know if that's what you were referring to, maybe it's additional information.
8th Jan 2024, 3:45 AM
NinjaGamer
NinjaGamer - avatar
0
Thank you guys! You are too much!
12th Jan 2024, 9:34 PM
José Vitor
José Vitor - avatar