Contenido del Curso
Introduction to HTML
Introduction to HTML
Nesting Elements and Comments
Block-level Elements
Block-level elements are those that, when used in an HTML code, is displayed by the browser on another line, and they have a certain margin around them that separates them from other elements around them.
index
index
index
Inline Elements
Inline elements don't start on a new line and don't have any margin around them.
index
index
index
Note
span
is an inline markup element holding no specific meaning in the markup but used as a convenient representation of any inline area that you want specifically styled or behave differently.
Nesting Elements
As shown in the above example of inline elements, the element span
is nested within the p
element. Some elements can be added to other elements.
- Both block and inline elements can be nested inside block elements;
- Inline element can be nested inside the block and inline element;
- Block element cannot be nested inside an inline element.
Comments
Comments help record what is happening in the code. This can be useful when you look at your code after some time. Also, it's helpful for another developer to know what happens with each code block when he inspects your code.
index
index
index
<b>
is an inline element used to bolden part of the text in the document;<em>
is an inline element used to emphasize part of the text in the document.
Task
- Add tags needed.
- Add your name.
- Bold and italicize text.
¡Gracias por tus comentarios!