Skip to main content

Command Palette

Search for a command to run...

Basic HTML Synthax

Updated
•3 min read•View as Markdown
Basic HTML Synthax
P
I build software and share what I learn while turning rough ideas into working products. Right now I’m building ArtifactPass, temporary artifact sharing for AI agents and people. It lets agents and developers publish finished Markdown, HTML, and PDF files as time-limited links, with browser previews, source access, exact downloads, and private deployments in a team’s own Cloudflare account. My work sits across product engineering, developer tools, AI-assisted workflows, and technical communication. I care about the parts people feel immediately: setup, trust, handoffs, useful defaults, and whether a product makes sense without a long explanation. I also share practical lessons from building with AI through Lorde Builds. ArtifactPass: https://artifactpass.com GitHub: https://github.com/lordelogos/lordebuilds.artifact.pass

HTML (Hypertext Markup Language) is the standard markup language used to create web pages. It uses tags to define different types of content, such as headings, paragraphs, and images. In this article, we'll take a closer look at the basic syntax of HTML.

HTML Documents

An HTML document is made up of several components, including the document type declaration, the HTML element, and the head and body sections. Here's what a basic HTML document looks like:

<!DOCTYPE html>
<html>
  <head>
    <title>Page Title</title>
  </head>
  <body>
    <h1>Heading</h1>
    <p>Paragraph</p>
  </body>
</html>

The <!DOCTYPE html> declaration at the beginning of the document tells the web browser which version of HTML is being used. In this case, we're using HTML5.

The <html> element is the root element of an HTML document. All other elements are contained within this element.

The <head> section contains information about the document, such as the title of the page. The title appears in the browser tab and is also used by search engines to index the page.

The <body> section contains the content of the document, such as headings, paragraphs, and images.

HTML Tags

HTML tags are used to define different types of content in an HTML document. They consist of a start tag, content, and an end tag. For example, the paragraph element in HTML looks like this: <p>This is a paragraph.</p>

The <p> tag is the start tag, which indicates the beginning of the paragraph element. The content is the text "This is a paragraph." The </p> tag is the end tag, which indicates the end of the paragraph element.

HTML tags can also have attributes, which provide additional information about the element. For example, the image element in HTML looks like this:

<img src="image.jpg" alt="Image">

The <img> tag is the image element. The src attribute specifies the URL of the image, while the alt attribute provides a text description of the image for users who can't see it.

HTML Entities

Some characters have special meanings in HTML and can't be used directly in the content of a document. For example, the less-than symbol (<) is used to indicate the start of an HTML tag. To use these characters in the content of a document, you need to use HTML entities. HTML entities are special codes that represent these characters.

Here are some common HTML entities:

  • &lt; - less-than symbol (<)

  • &gt; - greater-than symbol (>)

  • &amp; - ampersand (&)

  • &quot; - double quote (")

  • &apos; - single quote (')

Conclusion

In conclusion, understanding the basic syntax of HTML is essential for creating web pages. HTML documents are made up of several components, including the document type declaration, the HTML element, and the head and body sections. HTML tags are used to define different types of content in an HTML document, and can also have attributes to provide additional information about the element. Finally, HTML entities are used to represent special characters in HTML. By mastering these basic concepts, you'll be well on your way to creating your web pages.

What's next?

In the coming articles, we will be covering the HTML tags and elements in more depth. Don't forget to follow and share this with your friends that are just starting their web development journey

HTML for beginners

Part 2 of 5

HTML basics for beginners is designed to provide you with a comprehensive understanding of HTML and how it works. It's perfect for newbies or those looking to refresh their skills.

Up next

Basic HTML Tags

Headings, Paragraphs, Links, Images

More from this blog

C

Codeskills blog

33 posts

Learn web development with Html, Css, and JavaScript on my beginner-friendly blog by Paul Ehikhuemen. Whether you're a complete newbie or just need a refresher, Get started today!