Jump to content

  • Free consultations and support
  • Live chatClick Here for Live Chat
  • Call ico 1888-906-1888
    Phone support: Open

    Ready for your call :)

    Our business hours:

    Mon — Fri, 2am — 8pm (EST)

    US & EU support teams

    Phone support: Closed

    We are back in: 1h 20m

    Our business hours:

    Mon — Fri, 2am — 8pm (EST)

    US & EU support teams


CSS Block vs. inline CSS level elements

css block vs inline css level

  • Please log in to reply
 

#1 SmartWeb

SmartWeb

    Senior Member

  • Designer
  • 271 posts

Posted 26 August 2013 - 09:11 PM

Almost all HTML elements are block elements or inline elements.
1. Block elements begin on new lines while inline CSS begins on the same lines
2. In CSS blocks the line height, height, bottom and top margins can be edited and manipulated however they cannot be manipulated or changed in inline CSS
3. If not specified CSS Block width default is 100% of the containing element. Whereas in inline CSS the width is determined by the length of the text or image and it can’t be changed.
4.Examples of CSS block elements : <p>, <h1>, <div>,<ul>, <li> and <form>.
5.Examples of inline CSS elements include <a>, <label>, <input>, <img>, <strong> , <em> and <span>.

You can use display: inline/display: block to change the status of an element from being a block to inline, or the other way around. This could be used if you want
•an inline element to begin in a new line
•a block element to begin on the same line
•edit the width of a CSS inline element
•edit the height of a CSS inline element
•assign a background color to the width of the text of your block elements, without specifying a width




2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users