Curriculum
Course: HTML Basic
Login

Curriculum

HTML Basic

HTML Introduction

0/1

HTML Editors

0/1

HTML Attributes

0/1

HTML Paragraphs

0/1

HTML Formatting

0/1

HTML Comments

0/1

HTML Favicon

0/1

HTML Page Title

0/1

HTML Iframes

0/1

HTML Java Script

0/1

HTML File Paths

0/1

HTML Symbols

0/1
Text lesson

The <span> Element

The <span> element serves as an inline container utilized to annotate a segment of text or a portion of a document.

While the <span> element doesn’t necessitate specific attributes, styleclass, and id are frequently applied.

When paired with CSS, the <span> element facilitates the styling of text segments.

Example

<p>My mother has <span style=”color:blue;font-weight:bold;”>blue</span> eyes and my father has <span style=”color:darkolivegreen;font-weight:bold;”>dark green</span> eyes.</p>

Summary of the Chapter

  • A block-level element initiates a new line and occupies the entire available width.
  • An inline element does not initiate a new line and only occupies the necessary width.
  • The <div> element, functioning as a block-level container, is commonly employed to encapsulate other HTML elements.
  • The <span> element, serving as an inline container, is utilized to annotate specific text portions or sections within a document.

 

Click to Learn