HTML element: Difference between revisions
CSV import |
CSV import Tags: mobile edit mobile web edit |
||
| Line 33: | Line 33: | ||
[[Category:Web development]] | [[Category:Web development]] | ||
{{web-stub}} | {{web-stub}} | ||
== HTML element gallery == | |||
<gallery> | |||
File:HTML element content categories.svg|HTML element content categories | |||
File:W3C and Internet Explorer box models.svg|W3C and Internet Explorer box models | |||
</gallery> | |||
Latest revision as of 05:35, 3 March 2025
HTML element is a component of HTML, the language used to create web pages. HTML elements are the building blocks of all websites and are defined by HTML tags.
Overview[edit]
HTML elements are the individual components of an HTML document or web page. They are written with a start tag, with or without content, and an end tag. For example, the HTML element
is used to create a paragraph. The content of the paragraph is placed between the start tag (
) and the end tag (
).
Types of HTML Elements[edit]
There are several types of HTML elements, including:
- Block-level elements: These elements form a visible block on a page. Examples include ,
(headings),
(paragraph), and <form>.
- Inline elements: These elements do not start on a new line and only take up as much width as necessary. Examples include , <a> (anchor for hyperlinks), <img> (image), and (bold text).
- Empty or Void elements: These elements do not have a closing tag. Examples include
(line break),
(horizontal rule), and <img> (image).
- Semantic elements: These elements provide information about the type of content they contain. Examples include <article>, <section>, <nav> (navigation), and <header>.
Attributes
HTML elements can also have attributes, which provide additional information about the element. Attributes are included in the start tag and usually come in name/value pairs like name="value". For example, the "src" attribute for the <img> element is used to specify the source URL of an image.
See Also[edit]

This article is a World Wide Web–related stub. You can help WikiMD by expanding it!
HTML element gallery[edit]
-
HTML element content categories
-
W3C and Internet Explorer box models