HTML (HyperText Markup Language) is the standard markup language for creating web pages. It describes the structure of a web page and consists of a series of elements that tell the browser how to display the content.
HTML elements are the building blocks of HTML pages. They are represented by tags, such as <h1>
for headings, <p>
for paragraphs, and <a>
for links.
<h1> to <h6>
: Heading tags<p>
: Paragraph tag<a>
: Anchor (link) tag
Attributes provide additional information about HTML elements. They are always included in the opening tag and usually come in name/value pairs like name="value"
.
href
: Specifies the URL of a linksrc
: Specifies the source of an imagealt
: Provides alternative text for an image
HTML forms are used to collect user input. They contain form elements like text fields, checkboxes, radio buttons, and submit buttons.
<input>
: Input field<textarea>
: Multi-line text input<button>
: Button
Semantic HTML introduces meaning to the web page rather than just presentation. Examples include <header>
, <footer>
, <article>
, and <section>
.