02Geek HTML5 and JavaScript, TypeScript, React, Flash, ActionScript online School
Previous VideoNext Video

Putting Content In Our Body

In this video, we begin adding content to the BODY of our HTML page. Learn how to include simple text inside the BODY tag and why it's essential to keep your HTML code organized. By focusing on clean structure, you'll make it easier to style and maintain your web pages in the future.

Video Transcript

00:00How about if we put something in our 'body'
00:02The first thing we're going to do
00:03is to put some text and let's put here a better text
00:05such as 02Geek is a great school.
00:10-okay, sounds good to me
00:12In another way, if you are into marketing also
00:15this is a great way to brainwash you again
00:17and remind you that you are with 02geek
00:19I'm Ben Fhala. This is my mom Bellann
00:22So now that you remember where you're at
00:24and what you're learning
00:26We just put some text inside of our body part
00:30As soon as we save the file and go to the browser
00:33and refresh
00:34We're going to see this refresh in our content
00:37We did a little bit more work today than we had before
00:40-I'm going to ask you a question
00:42and just go with what you think is right, okay?
00:45-Why do you think it was important for the HTML people
00:49that created HTML specification
00:51to do all this breakdown?
00:53-why can't we just type things right away ?
00:57-Okay... because it seems to me like: 02geek is great school
01:02you need to know what size it's going to be,
01:04you need to know what color it's going to be
01:05and you don't want that written in the body
01:07you want that hidden.
01:09-Yeah, you want to organize things.
01:11and the more things are organized,
01:12it will be easier for you to build your page later on
01:15So we are in the early stage of organizing
01:18and you need to start somewhere
01:20So it's literally: A keep things clean.

Ready to Level Up Your Skills?

Join thousands of learners on 02GEEK and start your journey to becoming a coding expert today!

Enroll Now for Free!

Lesson notes

Task 3: Transcript Converted to Tutorial

Putting Content in Our Body

In this tutorial, we’ll take the next step in building an HTML page by adding content to the BODY tag. The BODY is where all visible content resides, and keeping it organized is essential for clean, maintainable code.


1. What Is the BODY Tag?

The <body> tag is where you place all the content that will appear on the webpage. Anything inside the BODY tag—like text, images, and links—is what users see when they visit your site.

Here’s a simple example:

<body>
  02Geek is a great school.
</body>

When viewed in a browser, the text 02Geek is a great school. will display on the page.


2. Adding Content to the BODY

Let’s walk through adding text to the BODY step-by-step:

  1. Open Your HTML File:

    • Use a plain text editor (e.g., Sublime Text, Notepad).
  2. Add Content Inside the BODY:
    Type the following code:

    <body>
      02Geek is a great school.
    </body>
    
  3. Save the File:
    Save your file with a .html extension, such as MyPage.html.

  4. View It in a Browser:
    Drag and drop the file into a browser. The text 02Geek is a great school. should appear on the page.


3. Why Keep Things Organized?

Organizing your HTML code is critical for several reasons:

  • Easier Styling: Cleanly written HTML makes it easier to apply styles (like colors and fonts) using CSS.
  • Maintainability: Organized code is easier to edit and update later.
  • Structure Matters: Breaking down your page into parts like the HEAD and BODY ensures the browser knows where to find specific information.

4. The Importance of Organization in HTML

HTML is all about structure. Even though you could technically write everything without tags, it would quickly become chaotic and difficult to manage.

For example, compare these two approaches:

Messy Code:

02Geek is a great school. This is another line of text.

Clean Code with HTML Tags:

<body>
  <p>02Geek is a great school.</p>
  <p>This is another line of text.</p>
</body>

The second example is much easier to read and maintain, especially as the page grows in complexity.


Summary

In this tutorial, you’ve learned:

  1. How to add simple content to the BODY tag.
  2. The importance of organizing your HTML for clean and maintainable code.

What’s Next?

In the next tutorial, we’ll explore how to add different types of elements to the BODY, like headlines, paragraphs, and more. Stay tuned!