Youssef Samir

Get in touch

HTML

A helpful reference for HTML tags, attributes, and structures to quickly create and organize web content.

Basic Structure

  • <html>: Root element of an HTML page.
  • <head>: Contains meta-information about the HTML document.
  • <title>: Specifies a title for the HTML document.
  • <body>: Contains the visible page content.

Headings

  • <h1> to <h6>: Define HTML headings, <h1> being the largest and <h6> the smallest.

Paragraphs and Text Formatting

  • <p>: Defines a paragraph.
  • <br>: Inserts a single line break.
  • <strong>: Makes text bold.
  • <em>: Emphasizes text.
  • <abbr>: Defines an abbreviation or acronym.
  • <cite>: Defines the title of a work.
  • <q>: Defines a short quotation.
  • <code>: Displays code.
  • <pre>: Pre-formatted text.
  • <samp>: Sample output from a computer program.
  • <var>: Represents a variable in mathematical expressions or programming contexts.
  • <a href="url">: Creates a hyperlink.
  • <base url="">: Sets the base URL/target for all relative URLs in a document.

Images and Objects

  • <img src="url" alt="text">: Embeds an image.
  • <object>: Embeds external content.
  • <param>: Defines parameters for an object element.
  • <embed>: Embeds external application or interactive content.
  • <video>: Embeds a video.
  • <audio>: Embeds sound content.

Lists

  • <ul>: Unordered list.
  • <ol>: Ordered list.
  • <li>: List item.

Tables

  • <table>: Defines a table.
  • <tr>: Table row.
  • <th>: Table header cell.
  • <td>: Table data cell.

Forms

  • <form action="url" method="get/post">: Defines an HTML form.
  • <input type="text/password/email/etc." name="name" value="default">: Defines an input control.
  • <textarea name="name" rows="rows" cols="cols">: Defines a multiline input control.
  • <button type="submit">: Defines a clickable button.
  • <label for="id">: Defines a label for a form control.
  • <select name="name">: Defines a dropdown list.
  • <option value="value">: Defines an option in a select list.
  • <input type="text" name="name" required>: Defines a required input control.
  • <textarea name="name" rows="rows" cols="cols" required>: Defines a required multiline input control.
  • <select name="name" required>: Defines a required dropdown list.

Semantic Elements

  • <header>: Defines a container for introductory content or navigational links.
  • <nav>: Defines navigation links.
  • <main>: Specifies the main content of a document.
  • <article>: Defines a self-contained composition in a document.
  • <section>: Defines sections in a document.
  • <aside>: Defines content aside from the content.
  • <footer>: Defines a footer for a document or a section.

Miscellaneous

  • <div>: Defines a division or section.
  • <span>: Defines a span of text.
  • <iframe>: Defines an inline frame.
  • <meta charset="UTF-8">: Specifies the character encoding for the HTML document.
  • <script>: Defines a client-side script.
  • <style>: Defines style information for a document.
  • <noscript>: Defines an alternate content for users that have disabled scripts in their browser.