import requests
from IPython.display import HTML
# 渲染整个网页
res=requests.get('https://jd.com')
HTML(res.text)
# 渲染 html 片段
text = 'mark 元素用于<mark>高亮</mark>文本'
HTML(text)
参考:
- jupyter渲染网页的3种方式: https://www.cnblogs.com/chenqionghe/p/12373387.html
- html高亮标签: https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/mark
网友评论