Skip to content

ImanBanerjee/html

Repository files navigation

HTML Notes

Below are comprehensive notes for understanding various HTML elements, their usage, and commonly used attributes.

Meta Tags

  • <meta charset="UTF-8">: Specifies the character encoding for the HTML document.
  • <meta name="viewport" content="width=device-width, initial-scale=1.0">: Sets the viewport to the width of the device and initial zoom level.
  • <meta http-equiv="X-UA-Compatible" content="ie=edge">: Instructs the browser to use the latest rendering engine.
  • <meta name="description" content="...">: Provides a brief description of the HTML document for search engines.
  • <meta name="keywords" content="...">: Specifies keywords relevant to the HTML document.
  • <meta name="author" content="...">: Specifies the author of the HTML document.

Header and Navigation

  • <header>: Represents the header of a document or a section.
  • <nav>: Creates a navigation bar.
  • <ul>: Unordered list to structure navigation items.
  • <li>: List items within the navigation menu.

Heading Tags

  • <h1> to <h6>: Used for defining headings of different levels.

Paragraph Tag

  • <p>: Represents a paragraph of text.

Anchor Tag

  • <a>: Creates hyperlinks.
    • href: Specifies the URL of the link.

Image Tag

  • <img>: Displays images.
    • src: Specifies the URL of the image.
    • alt: Provides alternative text for the image.
    • width: Specifies the width of the image.
    • height: Specifies the height of the image.

Styling Tags

  • <b>, <i>, <u>: Bold, italic, and underline text respectively.
  • <hr>: Creates a horizontal line.

Subscript and Superscript

  • <sub>, <sup>: Renders text as subscript or superscript respectively.

Preformatted Text

  • <pre>: Displays text exactly as written.

Structural Tags

  • <header>, <nav>, <footer>: Structural elements for header, navigation, and footer sections.
  • <main>, <section>, <article>: Main content and divisions within the document.

Division and Span Tags

  • <div>: Used for grouping elements for styling purposes.
  • <span>: Styles a small part of the text.

Lists

  • <ul>: Unordered list with bullet points.
  • <ol>: Ordered list with numbers.
  • <li>: List items within <ul> or <ol>.

Table Tag

  • <table>: Creates a table.
    • <tr>: Represents a table row.
    • <th>: Represents a table header cell.
    • <td>: Represents a table data cell.
    • colspan: Merges cells horizontally.
    • rowspan: Merges cells vertically.

Form Tag

  • <form>: Creates a form to collect user input.
    • action: Specifies the URL where the form data will be submitted.
    • method: Specifies the HTTP method for submitting form data (e.g., "get" or "post").
    • for: Associates a label with a form control.
    • type: Specifies the type of form control (e.g., "text", "radio", "checkbox", "submit").
    • name: Specifies the name of the form control.
    • id: Specifies a unique id for the form control.
    • value: Specifies the value of the form control.

Multimedia Tags

  • <iframe>: Embeds an inline frame.
  • <video>: Embeds a video clip.
  • <audio>: Embeds audio content.

Miscellaneous Tags

  • <br>: Inserts a single line break.
  • <hr>: Creates a thematic break or horizontal rule.
  • <meta>: Provides metadata about the HTML document.
  • <script>: Embeds client-side JavaScript code.
  • <style>: Embeds CSS styles within the HTML document.

These notes provide a comprehensive understanding of HTML elements, their usage, and commonly used attributes in web development.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages