<p>
</p>
<br>
<img>
tag uses src
attribute
to specify the name of the image file to display: <img src="happy.png">
<i>this <b>is</i> a test</b>
should be <i>this <b>is</b></i> <b>a test</b>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Hello HTML</title>
</head>
<body>
This is my <em>first</em> web page!
</body>
</html>
hello.html
(the file extension is very important!)
<!DOCTYPE html>
- must be first line to run
in standards mode (not quirks mode)
<html>
- surrounds all content except doctype
<head>
- head section is not visible in the browser,
may be omitted
<meta>
- specift the page's character encoding
(UTF-8 is the most popular)
<title>
- displays in the browser tab and used
when adding as a bookmark
<body>
- body section is the visibile part of the document
<!-- This is a comment -->
This is
a test!
is rendered in the browser as
<br>
to force the following text to the next line (like \n in C++) and
to create spaces
This is<br>
a test!
is rendered in the browser as
This is a test!
<strong>
instead of <b>
to signify strong importance
<em>
instead of <i>
to stress emphasis
<p>
for separating blocks of text by a small amount
of white space
<p>Paragraph 1</p>
<p>Paragraph 2</p>
Paragraph 1
Paragraph 2
<h1>
thru <h6>
used to specify headings of decreasing size
(main heading, subheading, sub-subheading, etc.)
<h1>Level 1 heading</h1>
<h2>Level 2 heading</h2>
<h3>Level 3 heading</h3>
<h4>Level 4 heading</h4>
<h5>Level 5 heading</h5>
<h6>Level 6 heading</h6>