Core HTML Elements

Core HTML Elements

HTML structures websites for readability, using elements like headers, paragraphs, lists, and embedded content.

Headers (h1 - h6): HTML headings (h1-h6) define content hierarchy. H1 is the main heading, while h2-h6 are subheadings, each deeper than the last.

Paragraphs (<p>): The <p> tag represents paragraphs, typically appearing as text blocks. They can also contain images and form fields.

Text Formatting

HTML offers elements for text formatting:

<strong>: Strong importance (bold).

<em>: Stress emphasis (italics).

<sub>: Subscript (smaller, lowered).

<sup>: Superscript (smaller, raised).

Lists in HTML

HTML lists organize information, enhancing readability and structure, useful for tables of contents or recipe lists.

The <ul> Element: The <ul> (unordered list) element creates bulleted lists where item order isn't significant.

The <ol> Element: The <ol> (ordered list) element creates numbered or lettered lists, unlike <ul>.

The <li> Element: The <li> (list item) element represents an item within an <ol> or <ul> list.

Inserting Images into Your Web Page: The <img> element embeds image formats like APNG, AVIF, GIFs, JPEGs, PNGs, SVGs, and WebP. src and alt are key attributes.

Src Attribute: The src attribute specifies the image path.

Alt Attribute: The alt attribute provides text for accessibility (screen readers) and appears if the image fails to load.

Inserting Links into Your Web Page

The <a> (anchor) element, with its href attribute, creates hyperlinks to various destinations (web pages, files, emails, etc.). The content within <a> tags should clearly state the link's destination.

Href Attribute: The href attribute contains the URL, supporting various schemes like telephone numbers and emails.

Read full post: https://tinyurl.com/y93yfdww

#webdev #aideveloper

2025/9/1 Edited to