๐ฆ All inline & block-level elements in HTML / CSS
Check inside the ๐งต for
โง Interesting details about inline & block-level
โง Link to high resolution image
โฉ
๐ Table of Contents
โ Introduction
โ inline-level
โ block-level
โ Changing Element Level
โ List of inline-level elements
โ List of block-level elements
โ Link to High Resolution Image
๐ฅ Disclaimer
โ I have compiled these information with all sincerity. But in case you find any omissions or, wrong representations, ๐ฌ me.
โ If you have any suggestions or, feedbacks, share those with me. I am eager to hear from you.
โ Introduction
โ HTML elements can be categorised as either "block-level" elements or "inline-level" elements.
โ Since this is a presentational characteristic, it is now-a-days specified by CSS in the Flow Layout.
โ inline-level
โ An inline element does not start on a new line and only takes up as much width as necessary.
โ Generally, inline elements may contain only data and other inline elements.
โ inline elements can't contain block elements inside.
โ block-level
โ A block-level element always starts on a new line.
โ It takes up the full width available (stretches out to the left and right as far as it can).
โ It may contain inline elements and (sometimes) other block-level elements.
โ Changing Element Level
โ You can change the visual presentation of an element using the CSS display property.
โ By changing the value of display from "inline" to "block", you can tell the browser to render the inline element in a block box, and vice versa.
โ However, doing this will not change the category and the content model of the element.
โ It means by changing the value of display from "inline" to "block" won't still allow you to put block-level elements inside it.
โ List of inline-level elements
โ a
โ abbr
โ acronym
โ audio
โ b
โ bdi
โ bdo
โ big
โ br
โ button
โ canvas
โ cite
โ code
โ data
โ datalist
โ del
โ dfn
โ em
โ embed
โ i
โ iframe
โ img
โ input
โ ins
โ kbd
โ label
โ map
โ mark
โ meter
โ noscript
โ object
โ output
โ picture
Are you into Web Development? Check out my "Moment" section for the regular contents (threads, infographics, resources) I post to make your learning easier.
If your are interested in such contents, Follow Me โ
โข โข โข
Missing some Tweet in this thread? You can try to
force a refresh
โ What is Semantic HTML?
โ Examples of Semantic Elements
โ Benefits of using Semantic HTML
โ.โ Improve site's SEO positioning
โ.โ Help your site more accessible
โ.โ Closer to natural language, easier to maintain
โ Should we not use "div"?
โ What is Semantic HTML?
โ Semantic HTML adds essential meaning to the web page rather than just presentation.
โ This lets web browsers, search engines, screen readers, RSS readers, and ultimately users understand it in a better way.
โ Static Methods
โ Accepts -ve Index
โ Returns Boolean
โ Returns Index
โ Returns new Array
โ Modifies Existing Array
โ Iterates through entire Array
โ Iterates Partially
โ Checks Elements "as it is"
โ Checks Elements custom way
โโ Accepts a callback
โ Functions - Basics
โ Function Scope
โ Function Arguments
โ Anonymous Functions
โ Higher Order Function & Callbacks
โ Closure
โ IIFE
โ Arrow Functions
๐ฅ Disclaimer
โฌ The questions covered here are mostly conceptual.
โฌ I never claim only these type of questions are/should be asked during interviews.
โฌ For interviews, you should have fundamentals strong. And you should be able to provide solutions to practical problems.