Block & Inline Elements , HTML Entities
Published by
sanya sanya
Block Level Elements
-
Block-level elements take up as much space as possible by default.
-
Each block-level element will start a new line on the page, stacking down the page.
-
In addition to stacking vertically, block-level elements will also take up as much horizontal space as possible.
-
Important!The p element is an example of a block-level element. Each new paragraph tag will appear on its own line vertically. Paragraphs with longer content will stretch all the way to the edge of the page.
Examples of block level elements:
<p><ol>,<ul>- All headings
<h1>...<h6> <article>,<section>,<div>
Inline Level Elements
- Inline elements display in a line. They do not force the text after them to a new line.
- An anchor (or link) is an example of an inline element. You can put several links in a row, and they will display in a line.
Examples of inline elements:
<a><strong>,<em>,<b>,<i>,<span>
HTML ENTITIES
An HTML entity is a piece of text ("string") that begins with an ampersand (&) and ends with a semicolon (;).
- Entities are frequently used to display reserved characters (which would otherwise be interpreted as HTML code)
- Invisible characters (like non-breaking spaces). You can also use them in place of other characters that are difficult to type with a standard keyboard.
| Entity | Symbol |
|---|---|
| < | < |
| > | > |
| & | & |
| non-breaking space | |
| © | © |
| ® | ® |
| ™ | ™ |
| £ | £ |
| ¥ | ¥ |
| € | € |
Library
WEB DEVELOPMENT
Basic
HTML - Hyper Text Markup Language
HTML: Hyper Text Markup Language
Getting Started with HTML
Working with Tags
HTML Tags
Attributes
Block & Inline Elements , HTML Entities
HTML Links
HTML Forms
Tables In HTML
HTML SEMANTICS
CSS - Cascading Style Sheets
JavaScript
Frontend
Backend
Interview Questions
FAANG QUESTIONS
On this page
Block Level Elements
Inline Level Elements
HTML ENTITIES

