My Blog

Welcome to my blog where I share thoughts on web development, technology, and personal experiences.

Semantic HTML5 Elements

Posted on April 13, 2026

HTML5 introduced several new semantic elements that provide better structure and meaning to web pages. Here are some of the key semantic elements:

Section

Sections are used to group related content together. They typically have a heading and can contain other elements like paragraphs, images, and lists.

Aside

Asides are used for content that is tangentially related to the main content. They are often presented as sidebars or callout boxes.

Article

Articles are for self-contained content that could be distributed independently from the rest of the site. Examples include a forum post, a magazine or newspaper article, or a blog entry.

Main

The main element is used to encapsulate the dominant content of the body of a document. There should only be one main element per document.

Forms, Lists, and Data

HTML5 also improved form elements and introduced better ways to structure lists and tabular data.

New York Bob 25 Los Angeles Charlie 35 Chicago End of Table WCAG - The Four Pillars of Accessibility Perceivable - Information must be presentable in ways users can perceive Operable - User interface components and navigation must be operable by all users Understandable - Information and the operation of the user interface must be understandable Robust - Content must be robust enough to be interpreted by a wide variety of user agents, including assistive technologies, This is the point of semantic HTML Decorative, Informative, or Functional. If the image is decorative, use an empty alt attribute (alt=''). If the image is informative, provide a brief description of the image in the alt attribute. If the image is functional (e.g., a button or link), describe its function in the alt attribute This is an inline quotation.
This is a block quotation. It is used for longer quotes that are set apart from the main text.

CSS Basics and Visual Identity

Box Model

Every HTML element can be considered as a box. The CSS box model describes the rectangular boxes that are generated for elements in the document tree and consists of: margins, borders, padding, and the actual content.

Web Safe Fonts vs Web fonts