Skip to content

feat(learn-html): add exercise to styles lesson#873

Open
DHaytham wants to merge 3 commits intoronreiter:masterfrom
DHaytham:learn-html-add-exercise
Open

feat(learn-html): add exercise to styles lesson#873
DHaytham wants to merge 3 commits intoronreiter:masterfrom
DHaytham:learn-html-add-exercise

Conversation

@DHaytham
Copy link
Copy Markdown

Added a new Excersise for the styles page in learnhtml.org

Copilot AI review requested due to automatic review settings April 11, 2026 21:43
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds an exercise to the Styles lesson to practice applying font-family via inline styles, an embedded stylesheet + selector, and JavaScript.

Changes:

  • Replaced the placeholder “no exercise yet” section with a 3-step exercise.
  • Updated the Tutorial Code to include three paragraphs (one per step).
  • Updated Expected Output and Solution to demonstrate inline CSS, a .p2 CSS rule, and programmatic styling for #p3.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 158 to +162
<head>
<title>Hello, World!</title>
<style>
.p2 {
font-family: monospace;
}
Copy link

Copilot AI Apr 11, 2026

Choose a reason for hiding this comment

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

Most lessons keep the standard <title>Hello, World!</title> in the Expected Output template (and this file previously did as well). Consider keeping the <title> alongside the new <style> block for consistency across tutorials.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@copilot apply changes based on this feedback

Comment on lines +176 to +178
<script>
var seriftext = document.getElementById("p3");
seriftext.style.fontFamily = "serif";
Copy link

Copilot AI Apr 11, 2026

Choose a reason for hiding this comment

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

Variable name seriftext doesn’t follow the camelCase style used elsewhere in this tutorial (e.g., sansSerifText above). Consider renaming it to something like serifText / serifTextEl for readability.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@copilot apply changes based on this feedback

Comment on lines +188 to +192
<style>
.p2 {
font-family: monospace;
}
</style>
Copy link

Copilot AI Apr 11, 2026

Choose a reason for hiding this comment

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

For consistency with other tutorials’ Solution templates, consider keeping the standard <title>Hello, World!</title> in the <head> in addition to the new <style> block.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@copilot apply changes based on this feedback

Comment on lines +205 to +207
<script>
var seriftext = document.getElementById("p3");
seriftext.style.fontFamily = "serif";
Copy link

Copilot AI Apr 11, 2026

Choose a reason for hiding this comment

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

Same as above: seriftext would be clearer as camelCase (serifText / serifTextEl) to match naming used elsewhere in the tutorial.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@copilot apply changes based on this feedback

DHaytham and others added 2 commits April 12, 2026 19:23
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants