THE ABSOLUTE BASICS
Last updated January 11, 2023
The HTML markup language revolves around tags. HTML elements are defined by a start tag, content, and an end tag (Some elements don't have end tags!).
<p> content </p>
In the example above, <p> is the start tag,
the content is obviously the content,
and </p> is the end tag.
<!DOCTYPE html>
<html>
<body>
<h1> Title </h1>
This text is cool or something, i dont care
</body>
</html>
OUTPUT:
Title
This text is cool or something, i dont care
All HTML files must have a <!DOCTYPE html> tag before all other tags.
Then, the actual document starts at <html>
and ends at </html>.
The visible part of the document (where text, images, videos, etc) are at is encased in the
<body> and </body> tags.
You can see all of this in the example above.
<h1>Heading 1</h1>
<h1>Heading 3</h1>
<h1>Heading 6</h1>
OUTPUT:
Heading 1
Heading 3
Heading 6
Headings use the <h1> to <h6> elements.
The <h1> tag is the largest heading, while
the <h6> tag is the smallest.
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
<a href="/assets/barack-obama.png">This is a link.</a><br>
<img src="/assets/barack-obama.png">
OUTPUT:
The <p> element displays a paragraph.
The <a> element creates links. It uses an attribute, which is like a setting
for an element.
The <br> element creates a line break.
The <img> element displays an image. It also uses an attribute.