HTML Components

HTML components provide a programmatic way to generate HTML markup through PHP methods.

Text Elements

Paragraph (p)

A basic block-level element for displaying text content with space before and after it.

This is a simple paragraph of text.

php

Span

The span() method creates an inline HTML element used to group and style parts of text or other inline elements.

This is important information.

php

Italic/Icon (i)

An inline element typically used for styling text in italics or displaying icons from icon libraries.

This text will be italic
Used as an icon
php

Container Elements

Div

The div() method creates a basic HTML container element. It is the most common and flexible way to group and organize content on a web page.

This is a div container
php

Row (divRow)

The divRow() method creates a Bootstrap row container. It automatically adds the 'row' class and provides flexbox capabilities for organizing columns and content.

Column 1
Column 2
Column 3
php

Flex Container (divFlex)

The divFlex() method creates a flexbox container. It automatically adds the 'd-flex' class and provides methods to control flexbox properties for advanced layouts.

Item 1
Item 2
Item 3
php

List Elements

Unordered List (ul)

A block element that creates an unordered (bulleted) list to display items without numerical sequence.

  • Feature one
  • Feature two
  • Feature three
php

Ordered List (ol)

A block element that creates an ordered (numbered) list to display items in a sequential manner.

  1. First item
  2. Second item
  3. Third item
php

Form Elements

Input

The input() method creates an HTML input field for collecting user input in forms.

php

Button

The button() method creates a clickable button element with various styles and types.

php

Media Elements

Image (img)

The img() method creates an HTML image element that displays images on your web page.

Sample Image
php

Navigation Elements

Link (a)

The a() method creates an HTML anchor element (link) that allows users to navigate to different pages or resources.

Available HTML Components