Lists
Unordered List
The <ul> tag (which is short for “unordered list”) is used when the order of the elements is not important. For example, to mark up the list of links in the menu, the benefits of the product, and the ingredients that make up the product.
Only <li> tags (which is short for “list item”) can be nested directly inside the <ul> tag, which is used to indicate list elements or items:
<ul>
<li>I am a list item, and I can be positioned in any place.</li>
<li>And I also am a list item, and the order in which I am listed is also not important</li>
</ul>
By default <ul> elements are highlighted with markers of the same color as the text color.
Ordered list
The <ol> tag (which is short for “ordered list”) is used when order in which the elements are presented in this list is important. Ordered lists are suitable for marking up algorithms, instructions, recipes, competition results, and so on.
The items in an ordered list are also marked up with the <li> tag. Code example:
<ol>
<li>I am the first and only item</li>
<li>I am not me if I am not the second item</li>
<li>Am I just third after all of these years? Always!</li>
</ol>
The sequence number is always placed in front of <ol> elements by default. <ol> may have several attributes: start, reversed and type.
The start attribute changes the starting number in the numbered list of items. It can be negative.
The reversed attribute reverses the numbering direction. This attribute does not require a value.
You can use the type attribute to assign different types of markers: lowercase and uppercase Latin letters or Roman numerals.
Description list
The <dl> tag (which is short for “description list”). The description list is used to mark up questions and answers, terms and definitions, as well as categories and topics. It is created using three tags:
- <dl> indicates the description list itself;
- <dt> (which is short for “description term”) indicates the term;
- <dd> (which is short for “description definition”) indicates the description or definition.
The <dt> and <dd> tags are written inside <dl>. Each <dl> list can contain one or more terms and one or more descriptions for each term. Code example:
<dl>
<dt>HTML</dt>
<dd>Hypertext Markup Language</dd>
<dt>CSS</dt>
<dd>Cascading Style Sheets</dd>
<dd>A language for formatting the presentation of HTML documents</dd>
</dl>
By default, the browser adds a small indent to the left of the definitions.
Preformatted text and code
The <pre> tag (which is short for “preformatted text”). It is used to display sample code, and it is also used to display ASCII Art. The browser will preserve and display all spaces, linebreaks and hyphens that are found inside the <pre> tag.
<pre>Example
of preformatted
text with preserved spaces
and line breaks</pre>
The tag<code> is used to present code snippets.
This tag can be used to mark up any text fragment that is recognized by a computer, including software code, markup, the file name, and so on. By default, browsers display text in the tag <code> using a monospaced font.
The <code>ul</code>tag, which is used to present an unordered list.
The tag<code> can be nested inside the <pre> tag.
Quotes
Short quotes
The <q> tag (which is short for “quote”). It is designed to call out quotes within a sentence. The browser automatically frames the text inside the tag with quotation marks. Therefore, you don’t need to add quotation marks manually.
Source of quotations
The <cite> tag. In addition to providing the address of the quotation source, you can also use this tag to indicate the name of the work that the text is quoted from as well as the name of the author or organization to which the text can be attributed. The contents of the <cite> tag are formatted in italics in the browser.
<p>According to <cite>Charles Bukowski</cite>, <q>An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way.</q></p>
The <cite> tag can be used independently, and it does not have to be used with a quote:
<p>Who is your favorite doctor (in the series <cite>Doctor Who</cite>)?</p>
Long quotes
The <blockquote> tag It is intended to indicate long quotes, which may consist of several paragraphs. This tag highlights a quote not simply as a segment of text within a sentence. Rather, it formats the quote as a separate block of text with indents.
<blockquote>
<p>Intelligence is highly valued when power is held cheap.</p>
<cite>Jason Statham</cite>
</blockquote>
An additional left and right margin is usually added to the content enclosed by the tag <blockquote> when displayed in the browser.
Marking up the text segments
Mnemonic characters
These are special strings that begin with an ampersand (&) and end with a semicolon (;). For example, the less than sign can be inserted into a page using the < (less than) mnemonic name, where as the greater than sign is represented by the > (greater than) mnemonic name:
Some of the characters in HTML are reserved, meaning that the browser will interpret them as HTML code. For example, any text after the less than sign (<) in the browser will be interpreted as a tag and will not be displayed on the page. To use special characters in the text of the page as ordinary characters, they must be replaced with mnemonic names.
<
ul>
</
ul>
Line break
The <br> tag (which is short for “break”). It is used to insert a line break in the text without creating a paragraph. For example, it is used to mark up poems or song lyrics.
Superscript and subscript
The <sup> and <sub> tags. The names are derived from the words “superscript” and “subscript”.
The <sup> tag displays the text as superscript, and the <sub> tag displays the text as subscript.
They are used to indicate units of measurement or to write simple formulas:
20m<sup>2</sup>
H<sub>2</sub>O
X<sup>3</sup>+X<sup>2</sup>=1
To create more complex formulas, these tags can be nested one inside the other.
Date and time
The <time> tag. You can use it to describe the dates for a person and a machine at the same time. We have the attribute datetime to specify the date in the machine-readable format ISO 8601, and it looks like this:
<time datetime="2016-11-18T09:54">09:54 AM</time>
<time datetime="2015-11-18">November 18, 2015</time>
<time datetime="2018-09-23">last Saturday</time>
<time datetime="2017-04-20">yesterday</time>
The browser will only display the contents of the tag; the contents of datetime will not be displayed.
Focusing attention
The tags <em> and <i>. The names are formed from the words “emphasis” and “italic”. They are intended to draw attention to the word or phrase. Visually, both tags look the same. They are used to italicize text.
The <em> tag is used to mark text that is specially emphasized and changes the meaning of the sentence.
I <em>simply adore</em> cold winter days!
The <i> tag is used to mark up text that is different from the surrounding text, but which is not considered to be more important. For example, you can use <i> to enclose names, terms, and foreign words. In addition, you can use this tag to enclose the thoughts of characters. Such text is usually is usually marked by changes in speech intonation:
He looked out the window and thought, <i>This simply cannot be true</i>!
Highlighting and assigning importance
The <strong> and <b> tags. The name <b> is derived from the word “bold”. Both tags display text in the same way. They make text bold.
The <strong> tag indicates that the marked text is important. It can be used to highlight warnings or parts of a document that the user should see before continuing with the rest of the text. In this case, enclosing part of the text with the <strong> tag should not change the meaning of the sentence.
<strong>Please note!</strong> There is a pitfall here. <strong>You may fall into the pit</strong> if you get too close to the edge.
The <b> tag is intended to highlight text in order to attract attention to it, but in a way that does not attribute any other significance to it. You should use it only in cases where other highlighting tags are not appropriate. A typical example is the way in which the introductory sentence of an article is highlighted.
You enter a small room. Your <b>sword</b> becomes brighter. A <b>rat</b> runs swiftly along the wall.
Description of changes
The <del> and <ins> tags. The names of these tags are taken from the words “delete” and “insert”. They are intended to describe changes in the document.
The <del> tag is used to highlight text that has been deleted in the new version of the document. This text is displayed as being crossed-out in the browser.
The <ins> tag is used to highlight text that has been added in the new version of the document. This text is displayed as being underlined in the browser.
<ul>
<li>Clean the dishwasher</li>
<li><del datetime="2009-10-11T01:25-07:00">Take a walk</del></li>
<li><del datetime="2009-10-10T23:38-07:00">Take a nap</del></li>
<li><ins>Buy a printer</ins></li>
</ul>
Content grouping
The <div> and <span> tags. These are “clean” elements, and usually they work great as a wrapper for styling or grouping other elements. It is recommended that you use these tags in situations where you cannot find any other suitable semantic tags.
The <div> tag is typically used to group structural elements, such as multiple paragraphs, or as a subordinate container for creating page layouts.
The <span> tag is used to group text elements, highlight individual words or phrases within paragraphs, list items, etc.
<article>
<div class="highlight">
<p>…</p>
<p>…</p>
</div>
<p>Text in which <span>a phrase is highlighted</span></p>
</article>
Continue
<!DOCTYPE html><html lang="en" class="no-js"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><script>var b=document.documentElement.classList;b.remove('no-js');if(!window.Promise||!window.sessionStorage||!!sessionStorage.getItem('muller.v2')){b.add('muller')}</script><link rel="dns-prefetch" href="https://assets.htmlacademy.org"><script async src="https://www.googletagmanager.com/gtag/js?id=G-MXPCRXM48C"></script><script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-MXPCRXM48C');
</script><script type="text/javascript">
(function(e,t){var n=e.amplitude||{_q:[],_iq:{}};var r=t.createElement("script")
;r.type="text/javascript"
;r.integrity="sha384-d/yhnowERvm+7eCU79T/bYjOiMmq4F11ElWYLmt0ktvYEVgqLDazh4+gW9CKMpYW"
;r.crossOrigin="anonymous";r.async=true
;r.src="https://cdn.amplitude.com/libs/amplitude-5.2.2-min.gz.js"
;r.onload=function(){if(!e.amplitude.runQueuedFunctions){
console.log("[Amplitude] Error: could not load SDK")}}
;var i=t.getElementsByTagName("script")[0];i.parentNode.insertBefore(r,i)
;function s(e,t){e.prototype[t]=function(){
this._q.push([t].concat(Array.prototype.slice.call(arguments,0)));return this}}
var o=function(){this._q=[];return this}
;var a=["add","append","clearAll","prepend","set","setOnce","unset"]
;for(var u=0;u<a.length;u++){s(o,a[u])}n.Identify=o;var c=function(){this._q=[]
;return this}
;var l=["setProductId","setQuantity","setPrice","setRevenueType","setEventProperties"]
;for(var p=0;p<l.length;p++){s(c,l[p])}n.Revenue=c
;var d=["init","logEvent","logRevenue","setUserId","setUserProperties","setOptOut","setVersionName","setDomain","setDeviceId","setGlobalUserProperties","identify","clearUserProperties","setGroup","logRevenueV2","regenerateDeviceId","groupIdentify","onInit","logEventWithTimestamp","logEventWithGroups","setSessionId","resetSessionId"]
;function v(e){function t(t){e[t]=function(){
e._q.push([t].concat(Array.prototype.slice.call(arguments,0)))}}
for(var n=0;n<d.length;n++){t(d[n])}}v(n);n.getInstance=function(e){
e=(!e||e.length===0?"$default_instance":e).toLowerCase()
;if(!n._iq.hasOwnProperty(e)){n._iq[e]={_q:[]};v(n._iq[e])}return n._iq[e]}
;e.amplitude=n})(window,document);
amplitude.getInstance().init("df11525b6880a3c5e2af14f9b6238408", null,{
includeUtm: true,
includeGclid: true,
includeReferrer: true,
deviceIdFromUrlParam: true
}, function (instance) {
window.amplitudeLoaded = true;
});
</script><link rel="stylesheet" href="https://assets.htmlacademy.org/css/core.v284.css"><link rel="stylesheet" href="https://assets.htmlacademy.org/css/profile.v236.css"><link rel="stylesheet" href="https://assets.htmlacademy.org/css/course.v246.css"><link rel="stylesheet" href="https://assets.htmlacademy.org/css/course-interface-light.v20.css"><link rel="stylesheet" href="https://assets.htmlacademy.org/css/course-interface-en.v2.css"><script src="https://assets.htmlacademy.org/js/sentry.js" data-sentry="3774884cc81746ed84c0ba7c5cd4ac7b" data-project="26" data-version="2"></script><link rel="stylesheet" href="/css/custom.css"><link rel="stylesheet" href="/css/cookies.css"><link rel="preload" as="script" href="https://assets.htmlacademy.org/js/general.v274.js"><title>Summary of “Text markup” — Text markup — HTML Academy</title><meta name="csrf-token" content="25064caf322823086fca37a7326b9bd2a54"><meta property="og:type" content="website"><meta property="og:site_name" content="HTML Academy"><meta name="twitter:url" property="og:url" content="https://htmlacademy.org"><meta name="twitter:title" property="og:title" content="Interactive online courses HTML Academy"><meta name="twitter:description" property="og:description" content="Together we’ll learn how to work with real code, solve true-to-life problems, use cutting edge technologies. Minimum of boring theory and lots of practical tasks."><meta name="twitter:image" property="og:image" content="https://htmlacademy.org/og/htmlacademy.png"><meta name="twitter:card" content="summary_large_image"><link rel="canonical" href="https://htmlacademy.org/courses/html-css-basics/text-markup/summary"><meta name="theme-color" content="#2f358f"></head><body class="course-interface course-interface--light course-interface--full" data-base="/assets/courses/14/"><header class="page-header page-header--course"><div class="page-header__inner"><div class="page-header__top"><a class="page-header__logo" href="/" aria-label="HTML Academy Home"><img src="https://assets.htmlacademy.org/img/logo--small.svg?cs=1218aec0be4a5f23db79ad29a14e30f7f9fb9a25" width="24" height="36" alt="HTML Academy"></a><nav class="main-nav main-nav--mini" role="navigation"><div class="main-nav__course-nav"><a class="main-nav__course-item main-nav__course-button main-nav__course-button--prev" href="/courses/html-css-basics/text-markup/div-span-tags">The div and span tags, style containers</a><div class="main-nav__course-item main-nav__course-list main-nav__course-list--collapsed"><b class="main-nav__course-title">Text markup</b><span class="main-nav__course-stat">20/21</span><div class="main-nav__course-contents"><a class="main-nav__course-contents-link" href="/courses/html-css-basics/text-markup">Back to the list of tasks</a><ul class="main-nav__course-contents-list"><li class="main-nav__course-contents-item"><a href="/courses/html-css-basics/text-markup/start-diary">1. Let’s start the diary</a></li><li class="main-nav__course-contents-item"><a href="/courses/html-css-basics/text-markup/ul-tag">2. The ul tag, which is used to indicate an unordered list</a></li><li class="main-nav__course-contents-item"><a href="/courses/html-css-basics/text-markup/ol-tag">3. The ol tag, which is used to provide an ordered list</a></li><li class="main-nav__course-contents-item"><a href="/courses/html-css-basics/text-markup/start-reversed-attributes">4. The start and reversed attributes</a></li><li class="main-nav__course-contents-item"><a href="/courses/html-css-basics/text-markup/nested-lists">5. Nested lists</a></li><li class="main-nav__course-contents-item"><a href="/courses/html-css-basics/text-markup/dl-dt-dd-tags">6. The dl, dt and dd tags as well as description list</a></li><li class="main-nav__course-contents-item"><a href="/courses/html-css-basics/text-markup/pre-tag">7. The pre tag, which is used to designate preformatted text</a></li><li class="main-nav__course-contents-item"><a href="/courses/html-css-basics/text-markup/html-entities">8. HTML entities</a></li><li class="main-nav__course-contents-item"><a href="/courses/html-css-basics/text-markup/code-tag">9. The tag code, or code snippet</a></li><li class="main-nav__course-contents-item"><a href="/courses/html-css-basics/text-markup/pre-code-tags">10. Combining pre and code tags</a></li><li class="main-nav__course-contents-item"><a href="/courses/html-css-basics/text-markup/q-tag">11. The tag q, which is used to format inline quotes</a></li><li class="main-nav__course-contents-item"><a href="/courses/html-css-basics/text-markup/blockquote-tag">12. The blockquote tag, which is used for calling out quotes</a></li><li class="main-nav__course-contents-item"><a href="/courses/html-css-basics/text-markup/br-tag">13. The br tag, which is used to create a line break</a></li><li class="main-nav__course-contents-item"><a href="/courses/html-css-basics/text-markup/sub-sup-tags">14. The sub and sup tags, which are used to indicate subscript and superscript</a></li><li class="main-nav__course-contents-item"><a href="/courses/html-css-basics/text-markup/time-tag">15. The time tag, which is used to specify the date and time</a></li><li class="main-nav__course-contents-item"><a href="/courses/html-css-basics/text-markup/em-i-tags">16. The em and i tags, which are used to attract the user’s attention</a></li><li class="main-nav__course-contents-item"><a href="/courses/html-css-basics/text-markup/strong-b-tags">17. The strong and b tags, which are used to strengthen or highlight text</a></li><li class="main-nav__course-contents-item"><a href="/courses/html-css-basics/text-markup/del-ins-tags">18. The del and ins tags, which are used to highlight changes</a></li><li class="main-nav__course-contents-item"><a href="/courses/html-css-basics/text-markup/div-span-tags">19. The div and span tags, style containers</a></li><li class="main-nav__course-contents-item main-nav__course-contents-item--current"><a href="/courses/html-css-basics/text-markup/summary">20. Summary of “Text markup”</a></li><li class="main-nav__course-contents-item"><a href="/courses/html-css-basics/text-markup/article-markup">21. Test: Marking up an article</a></li></ul></div></div><a class="main-nav__course-item main-nav__course-button main-nav__course-button--next" href="/courses/html-css-basics/text-markup/article-markup">Test: Marking up an article</a></div><ul class="main-nav__list main-nav__list--user main-nav__list--user-guest"><li class="main-nav__item" itemprop="name"><a class="main-nav__link" href="/signup?redirect_url=%2Fcourses%2Fhtml-css-basics%2Ftext-markup%2Fsummary" title="Sign up" data-modal="open" data-value="register" itemprop="url"><span class="main-nav__icon" aria-hidden="true"><svg aria-hidden="true"><use xlink:href="/img/sprites/general.svg#user"></use></svg></span>Sign up</a></li><li class="main-nav__item main-nav__item--login" itemprop="name"><a class="main-nav__link" href="/login?redirect_url=%2Fcourses%2Fhtml-css-basics%2Ftext-markup%2Fsummary" title="Log in" data-modal="open" data-value="login" itemprop="url"><span class="main-nav__icon" aria-hidden="true"><svg aria-hidden="true"><use xlink:href="/img/sprites/general.svg#login"></use></svg></span>Log in</a></li></ul></nav></div></div></header><main class="course-container"><div class="course-theory"><div class="course-theory__inner"><section class="course-theory__content"><h1 class="course-theory__content-heading course-theory__content-heading--synopsis">Summary of “Text markup”</h1><div class="course-theory__content-text"><h2>Lists</h2><h3>Unordered List</h3><p>The <code><ul></code> tag (which is short for “unordered list”) is used when the order of the elements is not important. For example, to mark up the list of links in the menu, the benefits of the product, and the ingredients that make up the product.</p><p>Only <code><li></code> tags (which is short for “list item”) can be nested directly inside the <code><ul></code> tag, which is used to indicate list elements or items: </p><pre><code><ul>
<li>I am a list item, and I can be positioned in any place.</li>
<li>And I also am a list item, and the order in which I am listed is also not important</li>
</ul></code></pre><p>By default <code><ul></code> elements are highlighted with markers of the same color as the text color.</p><h3>Ordered list</h3><p>The <code><ol></code> tag (which is short for “ordered list”) is used when order in which the elements are presented in this list is important. Ordered lists are suitable for marking up algorithms, instructions, recipes, competition results, and so on.</p><p>The items in an ordered list are also marked up with the <code><li></code> tag. Code example:</p><pre><code><ol>
<li>I am the first and only item</li>
<li>I am not me if I am not the second item</li>
<li>Am I just third after all of these years? Always!</li>
</ol></code></pre><p>The sequence number is always placed in front of <code><ol></code> elements by default. <code><ol></code> may have several attributes: <code>start</code>, <code>reversed</code> and <code>type</code>.</p><p>The <code>start</code> attribute changes the starting number in the numbered list of items. It can be negative.</p><p>The <code>reversed</code> attribute reverses the numbering direction. This attribute does not require a value.</p><p>You can use the <code>type</code> attribute to assign different types of markers: lowercase and uppercase Latin letters or Roman numerals.</p><h3>Description list</h3><p>The <code><dl></code> tag (which is short for “description list”). The description list is used to mark up questions and answers, terms and definitions, as well as categories and topics. It is created using three tags:</p><ul><li><code><dl></code> indicates the description list itself;</li><li><code><dt></code> (which is short for “description term”) indicates the term;</li><li><code><dd></code> (which is short for “description definition”) indicates the description or definition.</li></ul><p>The <code><dt></code> and <code><dd></code> tags are written inside <code><dl></code>. Each <code><dl></code> list can contain one or more terms and one or more descriptions for each term. Code example:</p><pre><code><dl>
<dt>HTML</dt>
<dd>Hypertext Markup Language</dd>
<dt>CSS</dt>
<dd>Cascading Style Sheets</dd>
<dd>A language for formatting the presentation of HTML documents</dd>
</dl></code></pre><p>By default, the browser adds a small indent to the left of the definitions.</p><h2>Preformatted text and code</h2><p>The <code><pre></code> tag (which is short for “preformatted text”). It is used to display sample code, and it is also used to display ASCII Art. The browser will preserve and display all spaces, linebreaks and hyphens that are found inside the <code><pre></code> tag.</p><pre><code><pre>Example
of preformatted
text with preserved spaces
and line breaks</pre></code></pre><p>The <code> tag<code></code> is used to present code snippets.</p><p>This tag can be used to mark up any text fragment that is recognized by a computer, including software code, markup, the file name, and so on. By default, browsers display text in the <code> tag <code></code> using a monospaced font.</p><pre><code>The <code>ul</code>tag, which is used to present an unordered list.</code></pre><p>The <code> tag<code></code> can be nested inside the <code><pre></code> tag.</p><h2>Quotes</h2><h3>Short quotes</h3><p>The <code><q></code> tag (which is short for “quote”). It is designed to call out quotes within a sentence. The browser automatically frames the text inside the tag with quotation marks. Therefore, you don’t need to add quotation marks manually.</p><h3>Source of quotations</h3><p>The <code><cite></code> tag. In addition to providing the address of the quotation source, you can also use this tag to indicate the name of the work that the text is quoted from as well as the name of the author or organization to which the text can be attributed. The contents of the <code><cite></code> tag are formatted in italics in the browser.</p><pre><code><p>According to <cite>Charles Bukowski</cite>, <q>An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way.</q></p></code></pre><p>The <code><cite></code> tag can be used independently, and it does not have to be used with a quote:</p><pre><code><p>Who is your favorite doctor (in the series <cite>Doctor Who</cite>)?</p></code></pre><h3>Long quotes</h3><p>The <code><blockquote></code> tag It is intended to indicate long quotes, which may consist of several paragraphs. This tag highlights a quote not simply as a segment of text within a sentence. Rather, it formats the quote as a separate block of text with indents.</p><pre><code><blockquote>
<p>Intelligence is highly valued when power is held cheap.</p>
<cite>Jason Statham</cite>
</blockquote></code></pre><p>An additional left and right margin is usually added to the content enclosed by the tag <code><blockquote></code> when displayed in the browser.</p><h2>Marking up the text segments</h2><h3>Mnemonic characters</h3><p>These are special strings that begin with an ampersand (&) and end with a semicolon (;). For example, the <i>less than</i> sign can be inserted into a page using the <code>&lt;</code> (less than) mnemonic name, where as the <i>greater than</i> sign is represented by the <code>&gt;</code> (greater than) mnemonic name:</p><p>Some of the characters in HTML are reserved, meaning that the browser will interpret them as HTML code. For example, any text after the <i>less than</i> sign (<) in the browser will be interpreted as a tag and will not be displayed on the page. To use special characters in the text of the page as ordinary characters, they must be replaced with mnemonic names.</p><pre><code>&lt;<b>ul</b>&gt;
&lt;/<b>ul</b>&gt;</code></pre><h3>Line break</h3><p>The <code><br></code> tag (which is short for “break”). It is used to insert a line break in the text without creating a paragraph. For example, it is used to mark up poems or song lyrics.</p><h3>Superscript and subscript</h3><p>The <code><sup></code> and <code><sub></code> tags. The names are derived from the words “superscript” and “subscript”.</p><p>The <code><sup></code> tag displays the text as superscript, and the <code><sub></code> tag displays the text as subscript.</p><p>They are used to indicate units of measurement or to write simple formulas:</p><pre><code>20m<sup>2</sup>
H<sub>2</sub>O
X<sup>3</sup>+X<sup>2</sup>=1</code></pre><p>To create more complex formulas, these tags can be nested one inside the other.</p><h3>Date and time</h3><p>The <code><time></code> tag. You can use it to describe the dates for a person and a machine at the same time. We have the attribute <code>datetime</code> to specify the date in the machine-readable format ISO 8601, and it looks like this:</p><pre><code><time datetime="2016-11-18T09:54">09:54 AM</time>
<time datetime="2015-11-18">November 18, 2015</time>
<time datetime="2018-09-23">last Saturday</time>
<time datetime="2017-04-20">yesterday</time></code></pre><p>The browser will only display the contents of the tag; the contents of <code>datetime</code> will not be displayed.</p><h3>Focusing attention</h3><p>The tags <code><em></code> and <code><i></code>. The names are formed from the words “emphasis” and “italic”. They are intended to draw attention to the word or phrase. Visually, both tags look the same. They are used to italicize text.</p><p>The <code><em></code> tag is used to mark text that is <i>specially emphasized</i> and changes the meaning of the sentence.</p><pre><code>I <em>simply adore</em> cold winter days!</code></pre><p>The <code><i></code> tag is used to mark up text that is different from the surrounding text, but which is not considered to be more important. For example, you can use <code><i></code> to enclose <i>names</i>, <i>terms</i>, and <i>foreign words</i>. In addition, you can use this tag to enclose the <i>thoughts</i> of characters. Such text is usually is usually marked by changes in speech intonation:</p><pre><code>He looked out the window and thought, <i>This simply cannot be true</i>!</code></pre><h3>Highlighting and assigning importance</h3><p>The <code><strong></code> and <code><b></code> tags. The name <code><b></code> is derived from the word “bold”. Both tags display text in the same way. They make text bold.</p><p>The <code><strong></code> tag indicates that the marked text is <b>important</b>. It can be used to highlight warnings or parts of a document that the user should see before continuing with the rest of the text. In this case, enclosing part of the text with the <code><strong></code> tag should not change the meaning of the sentence.</p><pre><code><strong>Please note!</strong> There is a pitfall here. <strong>You may fall into the pit</strong> if you get too close to the edge.</code></pre><p>The <code><b></code> tag is intended to highlight text in order to attract attention to it, but in a way that does not attribute any other significance to it. You should use it only in cases where other highlighting tags are not appropriate. A typical example is the way in which the introductory sentence of an article is highlighted.</p><pre><code>You enter a small room. Your <b>sword</b> becomes brighter. A <b>rat</b> runs swiftly along the wall.</code></pre><h3>Description of changes</h3><p>The <code><del></code> and <code><ins></code> tags. The names of these tags are taken from the words “delete” and “insert”. They are intended to describe changes in the document.</p><p>The <code><del></code> tag is used to highlight text that has been deleted in the new version of the document. This text is displayed as being crossed-out in the browser.</p><p>The <code><ins></code> tag is used to highlight text that has been added in the new version of the document. This text is displayed as being underlined in the browser.</p><pre><code><ul>
<li>Clean the dishwasher</li>
<li><del datetime="2009-10-11T01:25-07:00">Take a walk</del></li>
<li><del datetime="2009-10-10T23:38-07:00">Take a nap</del></li>
<li><ins>Buy a printer</ins></li>
</ul></code></pre><h2>Content grouping</h2><p>The <code><div></code> and <code><span></code> tags. These are “clean” elements, and usually they work great as a wrapper for styling or grouping other elements. It is recommended that you use these tags in situations where you cannot find any other suitable semantic tags.</p><p>The <code><div></code> tag is typically used to group structural elements, such as multiple paragraphs, or as a subordinate container for creating page layouts.</p><p>The <code><span></code> tag is used to group text elements, highlight individual words or phrases within paragraphs, list items, etc.</p><pre><code><article>
<div class="highlight">
<p>…</p>
<p>…</p>
</div>
<p>Text in which <span>a phrase is highlighted</span></p>
</article></code></pre><br><a class="button button--green button--large button--wide button--icon" href="/courses/html-css-basics/text-markup/article-markup"><svg aria-hidden="true"><use xlink:href="/img/sprites/general.svg#icon-check-bold"></use></svg>
Continue
</a></div></section></div></div><script
src="https://assets.htmlacademy.org/scripts/courses-spa/htmlacademy-task.v43.js"
data-assets-path="https://assets.htmlacademy.org/scripts/courses-spa/"
data-task-type="theory"
data-lang="en"
></script><script>HtmlacademyTask.setup(function(){});</script></main><footer class="page-footer page-footer--tiny"><div class="page-footer__inner"><p><a href="/docs/cookies">Cookies</a> ∙
<a href="/docs/privacy">Privacy</a> ∙
<a href="/docs/agreement">License Agreement</a> ∙
<a href="/docs/about">About</a> ∙
<a href="/contacts">Contacts</a> ∙
© HTML Academy OÜ, 2019−2026
</p><div class="page-footer__financial"><img src="https://assets.htmlacademy.org/img/visa-white.svg?cs=96e54ec8c587db9d4b1d8d328ffd87c2ebfd9555" alt="VISA" title="VISA" width="35" height="35"><img src="https://assets.htmlacademy.org/img/mastercard-horizontal.v2.svg" alt="Mastercard" title="Mastercard" width="35" height="35"></div></div></footer><div class="modal"><div class="modal__inner"><div class="modal__wrapper js-login hidden"><button class="modal__close icon-close" type="button" title="Close" data-modal="close"></button><h4 class="modal__header">Log in</h4><ul class="modal__social"><li class="modal__social-link modal__social-link--fb"><a href="/login/fb?redirect_url=%2Fcourses%2Fhtml-css-basics%2Ftext-markup%2Fsummary" rel="nofollow" title="Log in via Facebook"><svg aria-hidden="true"><use xlink:href="/img/sprites/general.svg#facebook"></use></svg></a></li><li class="modal__social-link modal__social-link--google"><a href="/login/google?redirect_url=%2Fcourses%2Fhtml-css-basics%2Ftext-markup%2Fsummary" rel="nofollow" title="Log in via Google"><svg height="30" width="30" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path fill="#ffffff" d="M457.732 216.625c2.628 14.041 4.063 28.743 4.063 44.098C461.796 380.688 381.481 466 260.204 466c-116.023 0-210-93.977-210-210s93.977-210 210-210c56.704 0 104.077 20.867 140.44 54.73l-59.204 59.197v-.135c-22.046-21.002-50-31.762-81.236-31.762-69.297 0-125.604 58.537-125.604 127.841 0 69.29 56.306 127.968 125.604 127.968 62.87 0 105.653-35.965 114.46-85.312h-114.46v-81.902h197.528z"/></svg></a></li></ul><div class="modal__or"><span>or</span></div><form class="modal__form form" action="/login?redirect_url=%2Fcourses%2Fhtml-css-basics%2Ftext-markup%2Fsummary" autocomplete="off" method="post" data-submit="o"><input type="hidden" name="csrf_name" value="csrf69aea7a40cc91"><input type="hidden" name="csrf_value" value="ecc9394b823eafc110a1bfaa67508b80"><div class="form__group"><label class="sr-only" for="login-email">Email</label><input class="field field--text field--full-width" type="email" name="email" placeholder="Email" value="" id="login-email"></div><div class="form__group"><label class="sr-only" for="login-password">Password</label><input class="field field--text field--full-width ym-disable-keys" type="password" name="password" placeholder="Password" id="login-password"></div><input class="button button--full-width" type="submit" data-submit-text="Logging in…" value="Log in"></form><p class="modal__forgot-password"><a href="/recover" data-modal="open" data-value="recover">Forgot your password?</a></p><a class="modal__bottom-link" href="/signup" data-modal="open" data-value="register">Sign up</a></div><div class="modal__wrapper js-register hidden"><button class="modal__close icon-close" type="button" title="Close" data-modal="close"></button><h4 class="modal__header">Sign up</h4><ul class="modal__social"><li class="modal__social-link modal__social-link--fb"><a href="/login/fb?redirect_url=%2Fcourses%2Fhtml-css-basics%2Ftext-markup%2Fsummary" rel="nofollow" title="Log in via Facebook"><svg aria-hidden="true"><use xlink:href="/img/sprites/general.svg#facebook"></use></svg></a></li><li class="modal__social-link modal__social-link--google"><a href="/login/google?redirect_url=%2Fcourses%2Fhtml-css-basics%2Ftext-markup%2Fsummary" rel="nofollow" title="Log in via Google"><svg height="30" width="30" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path fill="#ffffff" d="M457.732 216.625c2.628 14.041 4.063 28.743 4.063 44.098C461.796 380.688 381.481 466 260.204 466c-116.023 0-210-93.977-210-210s93.977-210 210-210c56.704 0 104.077 20.867 140.44 54.73l-59.204 59.197v-.135c-22.046-21.002-50-31.762-81.236-31.762-69.297 0-125.604 58.537-125.604 127.841 0 69.29 56.306 127.968 125.604 127.968 62.87 0 105.653-35.965 114.46-85.312h-114.46v-81.902h197.528z"/></svg></a></li></ul><div class="modal__or"><span>or</span></div><form class="modal__form form" action="/signup?redirect_url=%2Fcourses%2Fhtml-css-basics%2Ftext-markup%2Fsummary" autocomplete="off" method="post"><input type="hidden" name="csrf_name" value="csrf69aea7a40cc91"><input type="hidden" name="csrf_value" value="ecc9394b823eafc110a1bfaa67508b80"><div class="form__group"><label class="sr-only" for="email">
Email
<span class="required"><span class="sr-only">Required field</span><span class="required__star">*</span></span></label><div class="form__group-fields"><input class="field field--text field--full-width" type="email" name="email" value="" id="email" required placeholder="Email"></div></div><div class="form__group"><label class="sr-only" for="password">
Password
<span class="required"><span class="sr-only">Required field</span><span class="required__star">*</span></span></label><div class="form__group-fields"><input class="field field--text field--full-width" type="password" name="password" value="" id="password" required placeholder="Password"></div></div><div class="form__group"><label class="checkbox"><input class="checkbox__input" type="checkbox" name="agreement" value="1" required><span class="checkbox__text"><span>By signing up, you agree to our <a href="/docs/agreement" target="_blank">License Agreement</a> and <a href="/docs/privacy" target="_blank">Privacy Policy</a>.</span></span></label></div><input class="button button--full-width" type="submit" data-submit-text="Signing up…" value="Sign up"></form><a class="modal__bottom-link" href="/login?redirect_url=%2Fcourses%2Fhtml-css-basics%2Ftext-markup%2Fsummary" data-modal="open" data-value="login">Log in</a></div><div class="modal__wrapper modal__wrapper--no-btn-bottom js-recover hidden"><button class="modal__close icon-close" type="button" title="Close" data-modal="close"></button><h4 class="modal__header">Restore access</h4><p class="modal__text-accent">Have you forgotten your password or lost access to your profile? Enter your email connected to your profile and we will send you a link to restore access.</p><form class="modal__form form" action="/recover" autocomplete="off" method="post" data-submit="o"><input type="hidden" name="csrf_name" value="csrf69aea7a40cc91"><input type="hidden" name="csrf_value" value="ecc9394b823eafc110a1bfaa67508b80"><div class="form__group"><label class="sr-only" for="recovery-email">Email</label><input class="field field--text field--full-width" type="email" name="email" placeholder="Email" value="" id="recovery-email"></div><script src='https://www.google.com/recaptcha/api.js'></script><div class="form__group"><div class="g-recaptcha" data-sitekey="6LetCTEqAAAAANROWtPzfC7Rfg9iIRiRt2k2FPn7"></div></div><input class="button button--full-width" type="submit" data-submit-text="Sending…" value="Send"></form><p class="modal__text">Forgot to connect your email to the profile? Email us and we’ll help.</p></div></div></div><script async src="https://assets.htmlacademy.org/js/general.v274.js" data-assets="https://assets.htmlacademy.org" data-require="toggle,navigation-courses,modal,form,nav"></script></body></html>