Previous task
Text markup with HTML8/10
Back to the list of tasks
  1. 1. Paragraphs
  2. 2. Headings and subheadings
  3. 3. Unordered list
  4. 4. Ordered list
  5. 5. Multilevel list
  6. 6. Description List
  7. 7. Strong and b tags
  8. 8. Em and i tags
  9. 9. Line breaks and separators
  10. 10. Preformatted text
Nest task
  • Courses
  • Sign up
  • Log in

Loading...
It will be ready in a few seconds.

  • Theory
  • Theory

Em and i tags

The next two tags are designed to emphasize a word or phrase.

The <em> tag identifies the text that is emphasized, changing the meaning of the sentence.

For example, if we want to emphasize that Cupcake likes to play with dill rather than eat it, we would mark up the text as follows:

Instructor Cupcake likes to <em>play</em> with dill.

The <i> tag indicates text that is different from the surrounding text, but is not more important. This is usually used for titles, terms, and foreign words.

For example, if we want to indicate that inspector is some special term, we'll mark up the text like this:

Normally, Cupcake used the browser's <i>inspector</i> to find bugs.

Visually both tags are the same, they italicize text.

  • index.html
HTML
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Em and i tags</title> </head> <body> <h1>Text markup</h1> <p><b>Learn how to add text content to a simple HTML page: paragraphs, headings, subheadings, lists, and more.</b></p> <p>You've previously learned about the tags needed to create a simple HTML page and some of the service tags that are not displayed in the browser.</p> <p>In this article, we'll explore tags for marking up text. You can <strong>only</strong> use them inside the &lt;body&gt; tag.</p> </body> </html>

The code has changed, click "Update" or enable autorun.

You have moved to another page

Click inside the mini-browser to highlight this window.

100%
GoalsCompleted
0
    1. Enclose the phrase "marking up text" inside the em tag in the third paragraph.
    2. Use the i tag to mark up the term "browser" in the second paragraph.

    © 2023-2024, codehero.pro