Introduction
HTML, or HyperText Markup Language, is a markup language used to describe the structure of a web page. It uses a special syntax or notation to organize and give information about the page to the browser. Elements usually have opening and closing tags that surround and give meaning to content. For example, there are different tag options to place around text to show whether it is a heading, a paragraph, or a list.
For example:
<h1>Top level heading: Maybe a page title</h1>
<p>A paragraph of text. Some information we would like to communicate to the viewer. This can be as long or short as we would like.</p>
<ol>
<li>Number one on the list</li>
<li>Number two</li>
<li>A third item</li>
<li>A fourth item</li>
<li>A fifth item</li>
</ol>
Becomes:
Top level heading: Maybe a page title
A paragraph of text. Some information we would like to communicate to the viewer. This can be as long or short as we would like.
- Number one on the list
- Number two
- A third item
- A fourth item
- A fifth item
Say Hello to HTML Elements
Welcome to freeCodeCamp's HTML coding challenges. These will walk you through web development step-by-step.
First, you'll start by building a simple web page using HTML. You can edit code in your code editor, which is embedded into this web page.
Do you see the code in your code editor that says <h1>Hello</h1>? That's an HTML element.
Most HTML elements have an opening tag and a closing tag.
Opening tags look like this:
<h1>
Closing tags look like this:
</h1>
The only difference between opening and closing tags is the forward slash after the opening bracket of a closing tag.
Headline with the h2 Element
This element tells the browser about the structure of your website. h1 elements are often used for main headings, while h2 elements are generally used for subheadings. There are also h3, h4, h5 and h6 elements to indicate different levels of subheadings.
<h2>Hello World</h2>
Inform with the Paragraph Element
p elements are the preferred element for paragraph text on websites. p is short for "paragraph".
You can create a paragraph element like this:
<p>I'm a p tag!</p>
Fill in the Blank with Placeholder Text
Web developers traditionally use lorem ipsum text as placeholder text. The 'lorem ipsum' text is randomly scraped from a famous passage by Cicero of Ancient Rome.
Lorem ipsum text has been used as placeholder text by typesetters since the 16th century, and this tradition continues on the web.
Freecodecamp
The source of this page's content from Freecodecamp. Learn more from Freecodecamp.