search
HomeBackend DevelopmentPython TutorialHTML 中可以嵌入 Python 代码吗?
HTML 中可以嵌入 Python 代码吗?Apr 24, 2023 pm 06:13 PM
htmlpyscriptpython code

什么?可以在 HTML 中直接插入 Python 代码?

PyScript 由来自 Anaconda 的团队开发,是一个用于在 HTML 中插入 Python 代码的工具,这意味着你可以在 HTML 中编写和运行 Python 代码,在 PyScript 中调用 Javascript 库,并在 Python 中进行所有的 Web 开发,是不是很神奇!

什么?可以在 HTML 中直接插入 Python 代码?

有了 PyScript,我们现在可以在 HTML 中编写 Python 代码并构建 Web 应用了,PyScript 可以让更多的前端开发者接触到 Python 的强大功能。有了 PyScript,我们不再需要担心部署问题,因为一切都将在你的浏览器中执行,比如作为数据科学家,你可以在一个 html 文件中分享模型,只要其他人在浏览器中打开该文件,就会运行代码了。

什么?可以在 HTML 中直接插入 Python 代码?

PyScript 是基于 Pyodide(https:https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712pyodide.orghttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712) 开发的,它是 CPython 到 WebAssemblyhttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712Emscripten 的入口,PyScript 支持在浏览器中编写和运行 Python 代码,未来还将提供对其他语言的支持。

什么?可以在 HTML 中直接插入 Python 代码?

什么是 WebAssembly?

使得用 Python 编写网站成为可能的基础技术是 WebAssembly。最初开发 WebAssembly 时,Web 浏览器仅支持 Javascript。WebAssembly 于 2017 年首次发布,到 2019 年迅速成为了 W3C 的官方标准,它包括一种人类可读的 .wat 文本格式语言,然后将其转换为浏览器可以运行的二进制 .wasm 格式,这就使得我们可以用任何语言编写代码,将其编译为 WebAssembly,然后在网络浏览器中运行。

如何使用 PyScript?

PyScript 的 alpha 版本可以在 pyscript.net 上找到,代码可在 https:https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712github.comhttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712pyscript 获得。PyScript 允许你使用以下三个主要组件在 html 中编写 Python:

  • 定义了运行 Python 代码所需的 Python 包。
  • 是你编写在网页中执行的 Python 代码的地方。
  • 创建一个 REPL 组件,用于评估用户输入的代码并显示结果。

    我们先创建一个最简单的示例,代码如下所示:

    
    
    <meta charset="utf-8" https:>
    <meta name="viewport" content="width=device-width,initial-scale=1" https:>
    <title>PyScript Hello World<https:>
    
    <link rel="icon" type="imagehttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712png" href="favicon.png" https:>
    <link rel="stylesheet" href="https:https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712pyscript.nethttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712alphahttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712pyscript.css" https:>
    <script defer src="https:https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712pyscript.nethttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712alphahttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712pyscript.js"><https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712script>
    <https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712head>
    <body>
    Hello world! <br https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712>
    This is the current date and time, as computed by Python:
    <py-script>
    from datetime import datetime
    now = datetime.now()
    now.strftime("%mhttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712%dhttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712%Y, %H:%M:%S")
    <https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712py-script>
    <https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712body>
    <https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712html><https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712pre><p >只需要这页面上显示当前时间即可,在浏览器中打开后就可以看到结果了,如下所示:<https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712p><p  style="text-align: center;"><img src="/static/imghwm/default1.png"  data-src="https:https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712img.php.cnhttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712uploadhttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712articlehttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712000https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712465https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712014https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712168233119092064.png"  class="lazy" alt="什么?可以在 HTML 中直接插入 Python 代码?" https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712><https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712p><p >又比如我们创建一个具有流式数据的 Panel 仪表盘,代码如下所示,先通过 引入需要的包,然后在 中编写 Python 代码,如果你不喜欢直接在下编写 Python 代码,也可以使用 Python 文件作为源代码,例如。<https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712p><pre class="brush:typescript;toolbar:false;"><!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="utf-8">
    <link rel="icon" type="imagehttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712x-icon" href=".https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712favicon.png">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="default">
    <meta name="theme-color" content="#000000">
    <meta name="name" content="PyScripthttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712Panel Streaming Demo">
    <title>PyScripthttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712Panel Streaming Demo<https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712title>
    <link rel="icon" type="imagehttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712x-icon" href=".https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712favicon.ico">
    <link rel="stylesheet" href="https:https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712cdnjs.cloudflare.comhttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712ajaxhttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712libshttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712font-awesomehttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd837125.15.3https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712csshttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712all.min.css" type="texthttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712css" https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712>
    <link rel="stylesheet" href="https:https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712unpkg.comhttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712@holovizhttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712panel@0.13.0https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712disthttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712csshttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712widgets.css" type="texthttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712css" https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712>
    <link rel="stylesheet" href="https:https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712unpkg.comhttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712@holovizhttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712panel@0.13.0https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712disthttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712csshttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712markdown.css" type="texthttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712css" https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712>
    <script type="texthttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712javascript" src="https:https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712unpkg.comhttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712tabulator-tables@4.9.3https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712disthttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712jshttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712tabulator.js"><https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712script>
    <script type="texthttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712javascript" src="https:https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712cdn.bokeh.orghttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712bokehhttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712releasehttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712bokeh-2.4.2.js"><https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712script>
    <script type="texthttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712javascript" src="https:https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712cdn.bokeh.orghttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712bokehhttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712releasehttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712bokeh-widgets-2.4.2.min.js"><https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712script>
    <script type="texthttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712javascript" src="https:https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712cdn.bokeh.orghttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712bokehhttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712releasehttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712bokeh-tables-2.4.2.min.js"><https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712script>
    <script type="texthttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712javascript" src="https:https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712unpkg.comhttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712@holovizhttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712panel@0.13.0https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712disthttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712panel.min.js"><https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712script>
    <script type="texthttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712javascript">
    Bokeh.set_log_level("info");
    <https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712script>
    <link rel="stylesheet" href="https:https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712cdn.jsdelivr.nethttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712npmhttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712bootstrap@4.6.1https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712disthttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712csshttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712bootstrap.min.css">
    <link rel="stylesheet" href="https:https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712unpkg.comhttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712@holovizhttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712panel@0.13.0https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712disthttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712bundledhttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712bootstraptemplatehttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712bootstrap.css">
    <link rel="stylesheet" href="https:https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712unpkg.comhttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712@holovizhttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712panel@0.13.0https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712disthttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712bundledhttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712defaultthemehttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712default.css">
    <script src="https:https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712cdn.jsdelivr.nethttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712npmhttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712jquery@3.5.1https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712disthttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712jquery.slim.min.js"><https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712script>
    <script src="https:https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712cdn.jsdelivr.nethttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712npmhttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712bootstrap@4.6.1https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712disthttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712jshttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712bootstrap.bundle.min.js"><https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712script>
    <link rel="stylesheet" href="https:https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712pyscript.nethttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712alphahttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712pyscript.css" https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712>
    <script defer src="https:https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712pyscript.nethttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712alphahttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712pyscript.js"><https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712script>
    <https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712head>
    <py-env>
    - bokeh
    - numpy
    - pandas
    - panel
    <https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712py-env>
    <body>
    
    <nav   style="background-color: #000000;">
    <button type="button"  >
     <span ><https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712span>
     <https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712button>
     
     <a  href="https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712">
     <img src="/static/imghwm/default1.png"  data-src="https:https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712img.php.cnhttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712uploadhttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712articlehttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712000https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712465https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712014https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712168233119095196.png"  class="lazy" alt="什么?可以在 HTML 中直接插入 Python 代码?" https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712>
     <https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712a>
     <a  href="" style="color: #f0ab3c;">Panel Streaming Demo<https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712a>
     
    <https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712nav>
    
    
    
    
    
    
    
    
    
    
    <py-script>
    import asyncio
    import panel as pn
    import numpy as np
    import pandas as pd
    from bokeh.models import ColumnDataSource
    from bokeh.plotting import figure
    from panel.io.pyodide import show
    df = pd.DataFrame(np.random.randn(10, 4), columns=list('ABCD')).cumsum()
    rollover = pn.widgets.IntInput(name='Rollover', value=15)
    follow = pn.widgets.Checkbox(name='Follow', value=True, align='end')
    
    tabulator = pn.widgets.Tabulator(df, height=450, width=400)
    
    def color_negative_red(val):
    """
    Takes a scalar and returns a string with
    the css property `'color: red'` for negative
    strings, black otherwise.
    """
    color = 'red' if val < 0 else 'green'
    return 'color: %s' % color
    tabulator.style.applymap(color_negative_red)
    p = figure(height=450, width=600)
    cds = ColumnDataSource(data=ColumnDataSource.from_df(df))
    p.line('index', 'A', source=cds, line_color='red')
    p.line('index', 'B', source=cds, line_color='green')
    p.line('index', 'C', source=cds, line_color='blue')
    p.line('index', 'D', source=cds, line_color='purple')
    def stream():
    data = df.iloc[-1] + np.random.randn(4)
    tabulator.stream(data, rollover=rollover.value, follow=follow.value)
    value = {k: [v] for k, v in tabulator.value.iloc[-1].to_dict().items()}
    value['index'] = [tabulator.value.index[-1]]
    cds.stream(value)
    cb = pn.state.add_periodic_callback(stream, 200)
    controls = pn.Row(cb.param.period, rollover, follow, width=400)
    await show(controls, 'controls')
    await show(tabulator, 'table')
    await show(p, 'plot')
    <https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712py-script>
    <https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712body>
    <https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712html><https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712pre><p >上面的代码在浏览器中打开后就可以直接显示对应的效果了:<https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712p><p  style="text-align: center;"><img src="/static/imghwm/default1.png"  data-src="https:https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712img.php.cnhttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712uploadhttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712articlehttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712000https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712465https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712014https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712168233119361962.gif"  class="lazy" alt="什么?可以在 HTML 中直接插入 Python 代码?" https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712><https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712p><p >关于 PyScript 的更多使用方法可以查看 Git 仓库示例 https:https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712github.comhttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712pyscripthttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712pyscripthttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712treehttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712mainhttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712pyscriptjshttps://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712examples 了解更多。<https://www.php.cn/link/29a9f8c8460e5e2be4edde557fd83712p></script></https:>
    </title>

The above is the detailed content of HTML 中可以嵌入 Python 代码吗?. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:51CTO.COM. If there is any infringement, please contact admin@php.cn delete
HTML超文本标记语言--超在那里?(文档分析)HTML超文本标记语言--超在那里?(文档分析)Aug 02, 2022 pm 06:04 PM

本篇文章带大家了解一下HTML(超文本标记语言),介绍一下HTML的本质,HTML文档的结构、HTML文档的基本标签和图像标签、列表、表格标签、媒体元素、表单,希望对大家有所帮助!

html和css算编程语言吗html和css算编程语言吗Sep 21, 2022 pm 04:09 PM

不算。html是一种用来告知浏览器如何组织页面的标记语言,而CSS是一种用来表现HTML或XML等文件样式的样式设计语言;html和css不具备很强的逻辑性和流程控制功能,缺乏灵活性,且html和css不能按照人类的设计对一件工作进行重复的循环,直至得到让人类满意的答案。

web前端笔试题库之HTML篇web前端笔试题库之HTML篇Apr 21, 2022 am 11:56 AM

总结了一些web前端面试(笔试)题分享给大家,本篇文章就先给大家分享HTML部分的笔试题(附答案),大家可以自己做做,看看能答对几个!

HTML5中画布标签是什么HTML5中画布标签是什么May 18, 2022 pm 04:55 PM

HTML5中画布标签是“<canvas>”。canvas标签用于图形的绘制,它只是一个矩形的图形容器,绘制图形必须通过脚本(通常是JavaScript)来完成;开发者可利用多种js方法来在canvas中绘制路径、盒、圆、字符以及添加图像等。

总结HTML中a标签的使用方法及跳转方式总结HTML中a标签的使用方法及跳转方式Aug 05, 2022 am 09:18 AM

本文给大家总结介绍a标签使用方法和跳转方式,希望对大家有所帮助!

html5废弃了哪个列表标签html5废弃了哪个列表标签Jun 01, 2022 pm 06:32 PM

html5废弃了dir列表标签。dir标签被用来定义目录列表,一般和li标签配合使用,在dir标签对中通过li标签来设置列表项,语法“<dir><li>列表项值</li>...</dir>”。HTML5已经不支持dir,可使用ul标签取代。

html中document是什么html中document是什么Jun 17, 2022 pm 04:18 PM

在html中,document是文档对象的意思,代表浏览器窗口的文档;document对象是window对象的子对象,所以可通过“window.document”属性对其进行访问,每个载入浏览器的HTML文档都会成为Document对象。

html5支持boolean值属性吗html5支持boolean值属性吗Apr 22, 2022 pm 04:56 PM

html5支持boolean值属性;boolean值属性指是属性值为true或者false的属性,如input元素中的disabled属性,不使用该属性表示值为flase,不禁用元素,使用该属性可以不设置属性值表示值为true,禁用元素。

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

Atom editor mac version download

Atom editor mac version download

The most popular open source editor