Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Links and Images: Adds new line stating that HTML assumes image size unit in pixels (px) when not explicitly defined. #26542

Closed
wants to merge 1 commit into from

Conversation

crystalbajgai
Copy link

Added a little bit of information that when measurement units for the "height" and "width" attributes are not explicitly defined the values are assumed to be in pixels (px) by default in HTML. There isn't anything mentioned about this in the lesson. So it could have been confusing for beginners.

Because

In links-and-images lesson on Image Size Attributes, on codepen there is this code:

<img src="https://www.theodinproject.com/mstile-310x310.png" alt="The Odin Project Logo" height="310" width="310">

Here, it is told that its better to always define width and height for proper layout but here just 310 is mentioned without any unit and further clearation. This can confuse beginners. So I added a line stating "Here, the measurement units for the "height" and "width" attributes are not explicitly defined. When you specify dimensions in HTML without a unit, the values are assumed to be in pixels (px) by default.".
This can help the learners get more knowledge and clear the confusion they may have when just seeing the number.

This PR

  • A new line is added in Image size attributes: Here, the measurement units for the "height" and "width" attributes are not explicitly defined. When you specify dimensions in HTML without a unit, the values are assumed to be in pixels (px) by default.

Issue

Closes #XXXXX

Additional Information

Pull Request Requirements

  • [ X] I have thoroughly read and understand The Odin Project Contributing Guide
  • [ X] 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
  • [ x] The Because section summarizes the reason for this PR
  • [x ] The This PR section has a bullet point list describing the changes in this PR
  • [ x] If this PR addresses an open issue, it is linked in the Issue section
  • [x ] If any lesson files are included in this PR, they have been previewed with the Markdown preview tool to ensure it is formatted correctly
  • [ x] If any lesson files are included in this PR, they follow the Layout Style Guide

Added a little bit of information that when measurement units for the "height" and "width" attributes are not explicitly defined the values are assumed to be in pixels (px) by default in HTML.
There isn't anything mentioned about this in the lesson. So it could have been confusing for beginners.
@github-actions github-actions bot added the Content: Foundations Involves the Foundations content label Oct 22, 2023
@KevinMulhern
Copy link
Member

Thanks for taking the time to do this @crystalbajgai. But I think this might lead to more confusion than any it might clear up.

By this point in the curriculum, learners will not have touched CSS, including pixels or any other measurement units. Our goal with these early lessons isn't to be 100% technically exhaustive but to give learners just enough to get started.

@crystalbajgai
Copy link
Author

Thanks for taking the time to do this @crystalbajgai. But I think this might lead to more confusion than any it might clear up.

By this point in the curriculum, learners will not have touched CSS, including pixels or any other measurement units. Our goal with these early lessons isn't to be 100% technically exhaustive but to give learners just enough to get started.

Alrighty

@crystalbajgai crystalbajgai deleted the patch-1 branch October 24, 2023 08:56
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