Skip to content

barrynguyen8/phase-0-html-tag-lab

 
 

Repository files navigation

Your First HTML Tag Lab

Learning Goals

  • Code an h1 tag
  • Set the inner text of the h1 to Hello, World!

Introduction

So far, we've seen how to markup content with HTML, how to structure an HTML document and what HTML tags look like. Now let's focus on writing a single HTML tag from scratch and examining each of its parts.

Getting Started

Fork and clone this lesson into your local environment. Navigate into its directory in the terminal, then run code . to open the files in Visual Studio Code. Finally, run bundle to install the lab's dependencies. Run rspec as you go to see your test progress.

Code an h1 Tag

Open index.html in your text editor. Add the h1 opening and closing tags.

Set the Inner Text

Inside of the opening and closing h tags, insert the text: Hello, World!.

You can run the tests with this lab via the rspec command. Make sure you save the file before running the test suite. Failing tests will provide helpful error messages that you can use to debug your code — read them closely for hints!

Viewing Your Work in the Browser

While working through these assignments, your general workflow should center on writing code in the text editor and periodically running the test suite in the terminal to check your work.

Another great way to track your progress is to open up the HTML document in your browser and watch how each change you make in the text editor affects the visual layout in the browser.

Once you have the HTML document open in your browser, you can make changes to it in the text editor, save the file, refresh the page in the browser, and see the changes instantly.

Saving Your Work Remotely

Currently, the work you've done on this assignmnent is only on your local machine. To preserve work on your GitHub fork, you will need to stage the changes you've made, commit them, and push the commit up to GitHub. Use the following commands to do this:

git add .
git commit -m "Completed assignment"
git push

If you visit your fork on GitHub, you should now see that you've made the most recent commit, and your solution will be present in the files.

Conclusion

Congratulations! You wrote your first HTML tag. Now you can use your knowledge of this basic building block to learn more HTML tags and see how they work with each other to create an entire HTML document structure.

Resources

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 99.5%
  • HTML 0.5%