What is HTML?
Read on to learn about using HTML to create web pages. Need some background on how the web works? See the Intro to Creating Websites.
Without HTML
HTML is used to add structure and meaning to a web page. Without HTML, every web page would look like one giant block of plain text:
HTML Tags
HTML lets one mark off different elements of a page, such as paragraphs, headings and emphasized text. HTML does this with tags, which are special labels marked with pointy brackets <>
. For example, a paragraph in HTML is created with <p> </p>
tags:
<p>This is a paragraph.</p>
The paragraph starts with an opening <p>
tag and ends with a closing </p>
tag which is marked with a forward slash /
. Most elements in HTML are marked with an opening tag at the beginning and a closing tag at the end.
Emphasis
Now that you can separate your text into paragraphs, let's look at one more HTML tag. To emphasize text, use the <em>
tag. For example, this HTML:
Hello, <em>this is important!</em>
Will appear like this:
Hello, this is important!
HTML vs CSS
HTML tags are used to mark up meaningful elements on a page. To customize the exact appearance of elements, such as their specific size, color and spacing, you should use CSS, which will be covered later.
Challenges
Enter your HTML in the editor below to solve the challenge, and see how it would be displayed on the right. Note: the editor will automatically create closing HTML tags for you, which may sometimes need to be moved to a different position.
Challenge
Create a paragraph in HTML with one word in it - hello
.
Please sign in or sign up to submit answers.
Alternatively, you can try out Learneroo before signing up.
Challenge
Use <em>
tags to emphasize the world hello
in the text below.
Please sign in or sign up to submit answers.
Alternatively, you can try out Learneroo before signing up.