Code Monkey home page Code Monkey logo

phase-0-html-tag-lab's Introduction

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. Run learn test 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 h1 tags, insert the text: Hello, World!.

Check your progress by running learn test. 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.

You can open index.html a few ways, depending on the environment you are in:

For Mac users:

  • Open from the Terminal by running open index.html in the root directory of this lab
  • Use Finder to navigate to this lab's local folder and click the index.html file

For WSL users:

  • Open from Ubuntu by running explorer.exe index.html in the root directory of this lab
  • Open a new Explorer window. There is a bar that says "Quick Access" along the top of the window (similar to a URL bar in a browser). Click this and type \\wsl$ to access files and folders on Ubuntu. Navigate to /home/<your-user-name>/ to get to your home directory, then locate this lab's local folder and click the index.html file.

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

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

phase-0-html-tag-lab's People

Contributors

maxwellbenton avatar aviflombaum avatar lizbur10 avatar ihollander avatar gj avatar dependabot[bot] avatar jenmyers avatar peterbell avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.