Professional Documents
Culture Documents
HTML5 Text Formatting
HTML5 Text Formatting
HTML5 Text Formatting
T E X T FO R M AT T I N G
Learn at rocket speed
inarocket.com
Learn front-end development at rocket speed
inarocket .com
Paragraphs
PARAGRAPHS
<p>
Editor Browser
<body> index.html
<h1>Tim Berners-Lee</h1>
Tim Berners-Lee
<p>Sir Timothy John "Tim" Berners- Sir Timothy John "Tim" Berners- Lee is a British
Lee is a British computer scientist, computer scientist, best known as the inventor of the
best known as the inventor of the World Wide Web.
World Wide Web.</p>
</body>
The character entity stands for “non breaking space”
Editor Browser
<body> index.html
<p>Hello world!</p>
Hello world!
</body>
Three spaces
<br>
HTML elements with no content are called empty elements and
they have no closing tag in HTML5
Editor Browser
<body> index.html
<p>Sir Timothy John "Tim" Berners-
Sir Timothy John "Tim" Berners- Lee is a
Lee is a British computer scientist,
British computer scientist, Line break
<br>best known as the inventor of
best known as the inventor of the World Wide
the World Wide Web.</p>
Web.
</body>
<hr>
HTML elements with no content are called empty elements and
they have no closing tag
Editor Browser
<body> index.html
<h1>Tim Berners-Lee</h1>
Tim Berners-Lee
<hr>
<p>Sir Timothy John "Tim" Berners-
Sir Timothy John "Tim" Berners- Lee is the inventor of
Lee is the inventor of the the World Wide Web.
World Wide Web.</p>
</body>
Editor Browser
<body> index.html
<pre>Preformatted text is displayed in a
Performed text is displayed in a
fixed-width font. It also preserves both fixed-width font, and it preserves both
spaces and line spaces and line
breaks.</pre> breaks.
</body>
Editor Browser
<body> index.html
<blockquote>What's the worst that could
What's the worst that could happen? - Tim Ferriss
happen?
- <cite><a href=“https://en.wikipedia.org/wiki/
Tim_Ferriss">Tim Ferriss</a></cite>
</blockquote>
</body>
<mark>
Editor Browser
<body> index.html
<h1>Tim Berners-Lee</h1>
Tim Berners-Lee
<p>Sir Timothy John "Tim" Berners- Sir Timothy John "Tim" Berners- Lee is a British
Lee is a British computer scientist, computer scientist, best known as the inventor of the
best known as <mark>the inventor of the World Wide Web.
World Wide Web</mark>.</p>
</body>
Editor Browser
<ul> index.html
<li>Spielberg</li>
• Spielberg
<li>Coppola</li> • Coppola
<li>Scorsese</li> • Scorsese
</ul>
li = list item.
Editor Browser
<ol> index.html
<li>Usain Bolt - Gold</li>
1. Usain Bolt - Gold
<li>Yohan Blake - Silver</li>
2. Yohan Blake - Silver
<li>Justin Gatlin - Bronze</li> 3. Justin Gatlin - Bronze
</ol>
Editor Browser
<ul> index.html
<li>Red
• Red
<ul> • Light
<li>Light</li> • Dark
<li>Dark</li> • Green
</ul> • Blue
</li>
<li>Green</li>
<li>Blue</li>
</ul>
Editor Browser
<dl> index.html
<dt>W3C</dt>
W3C
<dd>Is the main international
Is the main international standards organization
standards organization for the World for the World Wide Web.
Wide Web.</dd> HTML
<dt>HTML</dt> Is the standard markup language used to create
<dd>Is the standard markup language web pages.
used to create web pages.</dd>
</dl>
Editor Browser
<details> index.html
<summary>What is HTML</summary>
• What is HTML
<p>Hypertext Markup Language</p>
Hypertext Markup Language.
</details> • What is CSS
<details>
<summary>What is CSS</summary>
<p>Cascading Style Sheets.</p>
</details>
Editor Browser
<details> index.html
<summary>What is HTML</summary>
• What is HTML
<p>Hypertext Markup Language</p>
Hypertext Markup Language.
<details> HTML5
<summary>HTML5</summary> Latest HTML recommendation by the W3C.
<p>Latest HTML recommendation by the
W3C.</p>
</details>
</details>
Editor Browser
<body> index.html
<figure>
<img src=“armstrong.png” alt="Neil Armstrong
descending the ladder of the Apollo 11.”>
<figcaption>Armstrong on the Moon
</figcaption>
</figure>
</body> Armstrong on the Moon
inarocket .com
HTML
T E X T FO R M AT T I N G
Learn at rocket speed
inarocket.com