Tag: HTML

  • VS Code, Associate Jinja with HTML

    Using VS Code, go to your settings.json file and add the following within the {} brackets.

    "files.associations": {
        "*.jinja": "html",
        "*.jinja2": "html",
        "*.j2": "html",
        "*.njk": "html"
    }

    Have you tried this approach or something similar? Leave a comment if this helped or if you have another approach.

    VS Code, Associate Jinja with HTML
  • Image Tag Cheat Sheet

    Basic Usage

    <img src="path/to/image.jpg" alt="Image description" />

    Attributes

    AttributeDescription
    srcThe path to the image file.
    altThe text to display if the image fails to load.
    widthThe width of the image in pixels.
    heightThe height of the image in pixels.
    titleThe text to display when the user hovers over the image.

    Example

    <img src="path/to/image.jpg" alt="Image description" width="200" height="200" title="Image title" />

    Notes

    • The alt attribute is required for accessibility. It is used by screen readers to describe the image to visually impaired users.
    • The width and height attributes are optional. If you do not specify them, the image will be displayed at its original size.
    • The title attribute is optional. It is used to provide additional information about the image when the user hovers over it.
    Image Tag Cheat Sheet
  • PDF to HTML

    WSL, Ubuntu 20.05, command line, for “PDF to HTML.” Step by step.

    Here are the short instructions to convert a PDF to HTML using WSL with Ubuntu 20.04:

    1. Install WSL with Ubuntu 20.04.
    2. Launch the Ubuntu terminal.
    3. Update Ubuntu: sudo apt update && sudo apt upgrade -y.
    4. Install Poppler: sudo apt install -y poppler-utils.
    5. Convert PDF to HTML using:
      pdftohtml -s <input_file>.pdf <output_file>.html
    6. Access the converted HTML file in the same directory.

    That’s it!

    PDF to HTML