Skip to content

Conversation

@dayview
Copy link

@dayview dayview commented Jan 7, 2026

Because

The original lesson text is technically accurate but doesn't give readers concrete examples of what div and span are or when to use them. It also jumps between concepts (generic containers, hooks, grouping, block-level) without clearly explaining the problem they solve or how they differ in practical use.

This PR

  • Defines div and span with clear behavior descriptions (block vs inline)
  • Provides concrete examples of when div and span are used (e.g., cards, styling a single word)
  • Explains how div and span relate to the block vs inline concept
  • Gives readers a simple decision guide for choosing between div and span in their projects

Issue

No related PR

Additional Information

Pull Request Requirements

  • I have thoroughly read and understand The Odin Project curriculum contributing guide
  • The title of this PR follows the location of change: brief description of change format, e.g. Intro to HTML and CSS lesson: Fix link text
  • The Because section summarizes the reason for this PR
  • The This PR section has a bullet point list describing the changes in this PR
  • If this PR addresses an open issue, it is linked in the Issue section
  • If any lesson files are included in this PR, they have been previewed with the Markdown preview tool to ensure it is formatted correctly
  • If any lesson files are included in this PR, they follow the Layout Style Guide

clarified the roles of div and span elements in HTML, what they "actually" do as generic containers for styling and layout.

highlighting the main differences in design behavior between block-level and inline elements
@github-actions github-actions bot added the Content: Foundations Involves the Foundations content label Jan 7, 2026
@mao-sz mao-sz requested review from a team and ManonLef and removed request for a team January 7, 2026 14:38
Copy link
Member

@ManonLef ManonLef left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @dayview ! Overall I think this is worded more beginner friendly, and it definitely reads much nicer. Seems like a good improvement to me.

I did leave some comments with suggestions.

Overall I dialed down the bold and italic styling. It doesn't fit well with how we generally use those in the lessons or even in this lesson. Block and inline for example have been covered and don't need emphasis.

Span is an inline-level element by default. It can be used to group text content and inline HTML elements for styling and should only be used when no other semantic HTML element is appropriate.
A `span` is a generic **inline** container. It sits inside a line of text and only takes up as much space as its content. Unlike `div`, it does **not** start on a new line. You use `span` when you want to style or target just part of a sentence.

For example, highlighting a single word or attaching a tooltip to a phrase. Again, you add a `class` or `id` so CSS can find and manipulate it.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
For example, highlighting a single word or attaching a tooltip to a phrase. Again, you add a `class` or `id` so CSS can find and manipulate it.
For example, when you want to highlight a single word or attaching a tooltip to a phrase you can add a `class` or `id` so CSS can find and manipulate it.

I also don't know why this "for example" starts in a new paragraph. Did you intend to remove the line above it perhaps?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! I intended to adjust the paragraph structure here. I thought combining/separating these sections would improve readability so that the flow of the sentence would be more proper and linked. However, if you feel the original structure works better, I'm happy to revert it!

@dayview
Copy link
Author

dayview commented Jan 27, 2026

Hi @ManonLef! Thank you so much for the feedback! I understand I went overboard with the formatting, and I wanted to try using the convention usually for wordings to the past modules/lessons. Since block and inline were already covered earlier, they don't need additional emphasis here. I'll update the PR to keep the formatting cleaner and more consistent with the rest of the curriculum.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content: Foundations Involves the Foundations content

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants