Resize the image in jupyter notebook using markdown 您所在的位置:网站首页 img/notebook/help02.png Resize the image in jupyter notebook using markdown

Resize the image in jupyter notebook using markdown

2022-11-06 14:35| 来源: 网络整理| 查看: 265

Markdown is a lightweight and popular Markup language. It is very similar to HTML (HyperText Markup Language). Markdown is mostly used by data analysts and data scientists to make their Jupyter Notebook more attractive, readable, and to give a website-like feeling to their notebook.

Note: We can not use markdown directly into jupyter notebook because it doesn’t support HTML tag directly but however we can use with Markdown option for inserting/resizing images.

Markdown is used at creating/Inserting the following in the notebook:

HeadingsBold & Italic textMathematical SymbolsBlockquotesLine BreakHorizontal LinesOrdered ListsUnordered ListsInternal and External LinksImageVideoInsert and resize an Image

Create a notebook or open an existing notebook of type Python3 in Jupyter Notebook. Change the cell type as Markdown as shown below. 

Insert an image using markdown language

We cannot change the size of the image using the markup, however, we can change its size using the HTML directly. We can use the img tag with width and height properties. We can specify either name of the image present in the local system or the URL of the image (link)

The syntax for img tag:

Note: Make sure that the image you want to insert is in the same folder as jupyter notebook.

Run the cell by clicking the run button at the top or by keyboard shortcut shift+enter.

Example:

Python3

# this code is belong to markdown in jupyter

Output:

Explanation: Here we passed an image name that is in the local system to src and modified the width and height of an image.

Specifying the URL of image

Here we will use the image URL to insert the image in markdown.

Python3

Output:

Explanation Here we passed URL which will be available at the top of your browser window of an image to src and specified the width and height of an image.

My Personal Notes arrow_drop_up


【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有