Claudia Chiriță . 2026/2027
<tag> content </tag>
opening tag closing tag
HTML elements must be correctly nested
<p><b> incorrectly nested </p></b>
<p><b> correctly nested </b></p>
name-attribute="value"
...

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title> title of the document </title>
...
</head>
<body>
</body>
</html>
Web 3.0
“ Web pages are designed to be read by people, not machines. The semantic web is a vision of information that can be readily interpreted by machines, so machines can perform more of the tedious work involved in finding, combining, and acting upon information on the web. ”
“ Semantic HTML is the use of HTML markup to reinforce the semantics, or meaning, of the information in webpages rather than merely to define its presentation or look. ”
“ Elements, attributes, and attribute values in HTML are defined (by this specification) to have certain meanings (semantics). ... Authors must not use elements, attributes, or attribute values for purposes other than their appropriate intended semantic purpose, as doing so prevents software from correctly processing the page. ”
<header>, <nav>, <main>, <article>
<section>, <aside>, <footer>
<header></header>
<section>
<article>
<figure>
<img>
<figcaption></figcaption>
</figure>
</article>
</section>
<footer></footer>
<div id="header"></div>
<div class="section">
<div class="article">
<div class="figure">
<img>
<div class="figcaption"></div>
</div>
</div>
</div>
<div id="footer"></div>
<article> content of the article </article>
<article> content of the article </article>
<section> content of the section </section>
<nav> navigation elements </nav>
<aside> content </aside>
<header> content </header>
<footer> content </footer>
<main> content </main>
<strong> important text, warning </strong>
<em> highlighted text </em>
<small> additional comments </small>
the elements b (bold), i (italic) became semantic as well starting with HTML5
<b> keywords </b>
<i> scientific terms / words in another language
/ alternative text </i>
<p> represents a paragraph (text fragment highlighting an idea)
<hr> represents a thematic break between groups of paragraphs
<div> content </div>
<span> content </span>
<br> for breaking the line
<ul> a list in which the order of the elements (items)
is not relevant
<li> used to create the elements of a list
<ol> a list in which the order of the elements is important
specific attributes: type, start, reversed
<dl>, <dt>, <dd>
<a href="URL"> content </a>
<a href="#id-menu"> link to the menu
...
<img src="image-address" alt="descriptive-text">
<figure>
<img src="image-address" alt="descriptive-text">
<figcaption> Figure 1. Description </figcaption>
</figure>
<audio src="URL-audio" controls> message </audio>
<video src="URL-video" controls autoplay> message </video>
<video src="URL-video" controls poster="URL-img"> message </video>
<iframe src="URL" width="n1" height="n2"> text displayed
if the website can't be embedded </iframe>
embedding a page inside the current page
used only for representing data
NOT for defining the layout of a page
<table> the content of the tabel, line by line </table>
<caption> the description of the tabel (optional) </caption>
<tr> line comprising cells </tr>
<td> data cell </td>
<th> header cell </th>
,=.
,=""""==.__.=" o".___
,=.==" ___/
,==.," , , \,===""
< ,==) \"'"=._.==) \
`=='' `" `"
questions?