Key Concepts

Review core concepts you need to learn to master this subject

<em> Emphasis Element

<p>This <em>word</em> will be emphasized in italics.</p>

The <em> emphasis element emphasizes text and browsers will usually italicize the emphasized text by default.

Arrow Chevron Left Icon
Introduction to HTML
Lesson 1 of 2
Arrow Chevron Right Icon
  1. 1
    Welcome to the world of code! Last year, millions of learners from our community started with HTML. Why? HTML is the skeleton of all web pages. It’s often the first language learned by developers, …
  2. 2
    HTML is composed of elements. These elements structure the webpage and define its content. Let’s take a look at how they’re written. The diagram to the right displays an HTML paragraph element. …
  3. 3
    One of the key HTML elements we use to build a webpage is the body element. Only content inside the opening and closing body tags can be displayed to the screen. Here’s what opening and closing b…
  4. 4
    HTML is organized as a collection of family tree relationships. As you saw in the last exercise, we placed tags within tags. When an element is contained inside another element, it is consider…
  5. 5
    Headings in HTML are similar to headings in other types of media. For example, in newspapers, large headings are typically used to capture a reader’s attention. Other times, headings are used to de…
  6. 6
    One of the most popular elements in HTML is the element. is short for “division” or a container that divides the page into sections. These sections are very useful for grouping elements in your…
  7. 7
    If we want to expand an element’s tag, we can do so using an attribute. Attributes are content added to the opening tag of an element and can be used in several different ways, from providing inf…
  8. 8
    If you want to display text in HTML, you can use a paragraph or span: - Paragraphs ( ) contain a block of plain text. - contains short pieces of text or other HTML. They are used to separat…
  9. 9
    You can also style text using HTML tags. The tag emphasizes text, while the tag highlights important text. Later, when you begin to style websites, you will decide how you want browsers to di…
  10. 10
    The spacing between code in an HTML file doesn’t affect the positioning of elements in the browser. If you are interested in modifying the spacing in the browser, you can use HTML’s line break el…
  11. 11
    In addition to organizing text in paragraph form, you can also display content in an easy-to-read list. In HTML, you can use an unordered list tag ( ) to create a list of items in no particular …
  12. 12
    Ordered lists ( ) are like unordered lists, except that each list item is numbered. They are useful when you need to list different steps in a process or rank items for first to last. You can …
  13. 13
    All of the elements you’ve learned about so far (headings, paragraphs, lists, and spans) share one thing in common: they’re composed entirely of text! What if you want to add content to your web pa…
  14. 14
    Part of being an exceptional web developer is making your site accessible to users of all backgrounds. In order to make the Web more inclusive, we need to consider what happens when assistive techn…
  15. 15
    In addition to images, HTML also supports displaying videos. Like the tag, the tag requires a src attribute with a link to the video source. Unlike the tag however, the element requires an …
  16. 16
    Congratulations on completing the first lesson of HTML! You are well on your way to becoming a skilled web developer. Let’s review what you’ve learned so far: - HTML stands for HyperT
  1. 1
    Now that we’ve learned about some of the most common HTML elements, it’s time to learn how to set up an HTML file. HTML files require certain elements to set up the document properly. We can let …
  2. 2
    The declaration provides the browser with two pieces of information (the type of document and the HTML version to expect), but it doesn’t actually add any HTML structure or content. To create …
  3. 3
    So far you’ve done two things to set up the file properly: * Declared to the browser that your code is HTML with * Added the HTML element ( ) that will contain the rest of your code. We have add…
  4. 4
    What kind of metadata about the web page can the element contain? If you navigate to the Codecademy catalog and look at the top of your browser, you’ll notice the words Full Catalog Courses …
  5. 5
    Good work! Unfortunately, the browser panel used by the Codecademy environment does not have a title bar, so the “Brown Bear” title you wrote in the previous exercise will not be displayed. Outside…
  6. 6
    One of the powerful aspects of HTML (and the Internet), is the ability to link to other web pages. You can add links to a web page by adding an anchor element and including the text of the …
  7. 7
    Have you ever clicked on a link and observed the resulting web page open in a new browser window? If so, you can thank the element’s target attribute. The target attribute specifies how a link s…
  8. 8
    Thus far you have learned how to link to external web pages. Many sites also link to internal web pages like Home, About, and Contact. Before we learn how to link between internal pages, let’s est…
  9. 9
    You’ve probably visited websites where not all links were made up of text. Maybe the links you clicked on were images or some other form of content. So far, we’ve added links that were made up of …
  10. 10
    At this point, we have all the content we want on our page. Since we have so much content, it doesn’t all fit on the screen. How do we make it easier for a user to jump to different portions of our…
  11. 11
    The rest of this lesson will focus on some tools developers use to make code easier to interpret. As the code in an HTML file grows, it becomes increasingly difficult to keep track of how elements…
  12. 12
    The second tool web developers use to make the structure of code easier to read is indentation. The spaces are inserted using the space and tab bars on your keyboard. The World Wide Web C…
  13. 13
    HTML files also allow you to add comments to your code. Comments begin with . Any characters in between will be ignored by your browser. Including comments in your code is helpful for many r…
  14. 14
    You now know all of the basic elements and set-up you need to structure an HTML page and add different types of content. With the help of CSS, very soon you’ll be creating beautiful websites! Whil…

What you'll create

Portfolio projects that showcase your new skills

Pro Logo

How you'll master it

Stress-test your knowledge with quizzes that help commit syntax to memory

Pro Logo