Tags and Elements
Part of the Fundamentals section of Coddy's HTML journey — lesson 3 of 60.
In HTML, tags are keywords enclosed in angle brackets, like <html>. They tell the browser how to display the content. Elements are the components of an HTML document, consisting of a start tag, content, and an end tag.
Here's a simple breakdown:
- Tags: Keywords in angle brackets that define how content is displayed.
- Elements: Components made up of a start tag, content, and an end tag.
For example:
<p>This is a paragraph.</p>In this example, <p> is the start tag, "This is a paragraph." is the content, and </p> is the end tag. Together, they form a paragraph element.
Challenge
EasyYou are given an HTML code with a paragraph tag (<p>) change the text inside the paragraph to:
Hello, HTML!Make sure to not delete the start or end tag!
Cheat sheet
HTML tags are keywords enclosed in angle brackets that tell the browser how to display content. Elements consist of a start tag, content, and an end tag.
Example of a paragraph element:
<p>This is a paragraph.</p>Structure breakdown:
<p>- start tag- "This is a paragraph." - content
</p>- end tag
Try it yourself
<!DOCTYPE html>
<html>
<body>
<p>This is some text</p>
</body>
</html>This lesson includes a short quiz. Start the lesson to answer it and track your progress.
All lessons in Fundamentals
1HTML Basics
What is HTML?Basic Structure of an HTMLTags and ElementsNesting and Closing TagsComments in HTML2Text and Formatting
HeadingsParagraphsLine BreaksBold and Italic TextBold and Italic AgainRecap - Formatting8Forms and Inputs Part 1
Form BasicsText InputsInput AttributesPassword FieldLabels for InputsRecap - Basic Form11Event Registration Page
Project OverviewHeader Section9Forms and Inputs Part 2
Radio ButtonsCheckboxesDropdownsButtonsButtons in FormsRecap - Forms #1Recap - Forms #2