如何将python文本添加到HTML网站?

如何将python文本添加到HTML网站?,python,html,css,Python,Html,Css,我正在尝试将此python代码添加到我的网站中。如何将python代码引用到html中?对不起,我是一个完全不需要开发的人,一周前刚开始编码,aylmao 蟒蛇 html 从括号开始 从括号开始 这是你的向导! 欢迎使用方括号,这是一个理解网页设计的现代开源代码编辑器。它是一个轻量级的, 强大的代码编辑器,将可视化工具混合到编辑器中,因此您可以获得适当的帮助 当你想要的时候。 方括号是一种不同类型的编辑器。 方括号具有一些独特的功能,如快速编辑、实时预览和其他在其他应用程序中找不到的功能

我正在尝试将此python代码添加到我的网站中。如何将python代码引用到html中?对不起,我是一个完全不需要开发的人,一周前刚开始编码,aylmao

蟒蛇

html


从括号开始
从括号开始
这是你的向导!

欢迎使用方括号,这是一个理解网页设计的现代开源代码编辑器。它是一个轻量级的,
强大的代码编辑器,将可视化工具混合到编辑器中,因此您可以获得适当的帮助
当你想要的时候。

方括号是一种不同类型的编辑器。 方括号具有一些独特的功能,如快速编辑、实时预览和其他在其他应用程序中找不到的功能 编辑。括号是用JavaScript、HTML和CSS编写的。这意味着你们中的大多数人使用括号 具备修改和扩展编辑器所需的技能。事实上,我们每天都使用括号来构建 括号。要了解有关如何使用关键功能的更多信息,请继续阅读。

括号内的项目 要使用括号编辑自己的代码,只需打开包含文件的文件夹即可。 方括号将当前打开的文件夹视为“项目”;代码提示、实时预览和 快速编辑仅使用当前打开文件夹中的文件。

一旦您准备好退出这个示例项目并编辑自己的代码,您就可以使用下拉列表了 在左侧边栏中切换文件夹。现在,下拉菜单上写着“开始”-这就是 包含当前正在查看的文件的文件夹。单击下拉列表并选择“打开文件夹…” 打开您自己的文件夹。 您也可以稍后使用下拉列表切换回以前打开的文件夹,包括 样本项目。 CSS和JavaScript的快速编辑 不再在文档之间切换和丢失上下文。编辑HTML时,请使用 Cmd/Ctrl+E快捷方式,打开一个显示所有相关CSS的快速内联编辑器。 对CSS进行调整,按ESC键,您就可以重新编辑HTML,或者只需离开 CSS规则打开,它们将成为HTML编辑器的一部分。如果在外部按ESC键 一个快速的内联编辑器,它们都会崩溃。“快速编辑”还将查找在“更少”和“更少”中定义的规则 SCSS文件,包括嵌套规则。

想看看它的实际行动吗?将光标放在上面的标签上,然后按 Cmd/Ctrl+E。您应该会看到上面出现一个CSS快速编辑器,显示 适用于它。快速编辑也适用于类和id属性。你可以和你的朋友一起使用 更少和SCSS文件。 您可以用同样的方法创建新规则。单击上面的一个标记,然后按 Cmd/Ctrl+E。目前没有规则,但您可以单击新规则 按钮为添加新规则。 您可以使用相同的快捷方式编辑其他内容,以及JavaScript中的函数, 颜色和动画计时功能-我们一直在添加越来越多的功能。

目前,内联编辑器不能嵌套,因此只能在光标移动时使用快速编辑 在“全尺寸”编辑器中。

在浏览器中实时预览HTML和CSS更改 你知道我们多年来一直在做的“保存/重新加载舞蹈”吗?你在其中做出改变的那个 您的编辑器,点击save,切换到浏览器,然后刷新以最终查看结果? 用括号,你不必跳那种舞。

方括号将打开与本地浏览器的实时连接,并在需要时推送HTML和CSS更新 打字!今天,您可能已经在使用基于浏览器的工具执行类似的操作,但是使用括号 无需将最终代码复制并粘贴回编辑器中。您的代码在 浏览器,但生活在您的编辑器中!

实时突出显示HTML元素和CSS规则 用括号可以很容易地看到HTML和CSS中的更改将如何影响页面。当你的光标 在CSS规则上,括号将突出显示浏览器中所有受影响的元素。同样,在编辑时 在HTML文件中,括号将突出显示浏览器中相应的HTML元素。

如果你安装了谷歌浏览器,你可以自己试试。点击闪电 图标位于括号窗口的右上角,或按Cmd/Ctrl+Alt+P 在HTML文档上启用实时预览,可以实时编辑所有链接的CSS文档。 当括号与浏览器建立连接时,图标将从灰色变为金色。 现在,将光标放在上面的标记上。请注意出现的蓝色突出显示 周围的图像在铬。接下来,使用Cmd/Ctrl+E打开已定义的CSS规则。 尝试将边框大小从10px更改为20px或更改背景 颜色从“透明”变为“热粉色”。如果括号和浏览器并排运行,则 您的更改将立即反映在浏览器中。很酷,对吧?

现在,方括号只支持HTML和CSS的实时预览。但是,在当前版本中 JavaScript文件a

>>> print "papa bless."
<!DOCTYPE html>
<html>

    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <title>GETTING STARTED WITH BRACKETS</title>
        <meta name="description" content="An interactive getting started guide for Brackets.">
        <link rel="stylesheet" href="style.css">
    </head>
    <body>

        <h1>GETTING STARTED WITH BRACKETS</h1>
        <h2>This is your guide!</h2>

        <!--
            MADE WITH <3 AND JAVASCRIPT
        -->

        <p>
            Welcome to Brackets, a modern open-source code editor that understands web design. It's a lightweight,
            yet powerful, code editor that blends visual tools into the editor so you get the right amount of help
            when you want it.
        </p>

        <!--
            WHAT IS BRACKETS?
        -->
        <p>
            <em>Brackets is a different type of editor.</em>
            Brackets has some unique features like Quick Edit, Live Preview and others that you may not find in other
            editors. Brackets is written in JavaScript, HTML and CSS. That means that most of you using Brackets
            have the skills necessary to modify and extend the editor. In fact, we use Brackets every day to build
            Brackets. To learn more about how to use the key features, read on.
        </p>

        <!--
            GET STARTED WITH YOUR OWN FILES
        -->

        <h3>Projects in Brackets</h3>
        <p>
            In order to edit your own code using Brackets, you can just open the folder containing your files.
            Brackets treats the currently open folder as a "project"; features like Code Hints, Live Preview and
            Quick Edit only use files within the currently open folder.
        </p>

        <samp>
            Once you're ready to get out of this sample project and edit your own code, you can use the dropdown
            in the left sidebar to switch folders. Right now, the dropdown says "Getting Started" - that's the
            folder containing the file you're looking at right now. Click on the dropdown and choose "Open Folder…"
            to open your own folder.
            You can also use the dropdown later to switch back to folders you've opened previously, including this
            sample project.
        </samp>

        <!--
            THE RELATIONSHIP BETWEEN HTML, CSS AND JAVASCRIPT
        -->
        <h3>Quick Edit for CSS and JavaScript</h3>
        <p>
            No more switching between documents and losing your context. When editing HTML, use the
            <kbd>Cmd/Ctrl + E</kbd> shortcut to open a quick inline editor that displays all the related CSS.
            Make a tweak to your CSS, hit <kbd>ESC</kbd> and you're back to editing HTML, or just leave the
            CSS rules open and they'll become part of your HTML editor. If you hit <kbd>ESC</kbd> outside of
            a quick inline editor, they'll all collapse. Quick Edit will also find rules defined in LESS and
            SCSS files, including nested rules.
        </p>

        <samp>
            Want to see it in action? Place your cursor on the <!-- <samp> --> tag above and press
            <kbd>Cmd/Ctrl + E</kbd>. You should see a CSS quick editor appear above, showing the CSS rule that
            applies to it. Quick Edit works in class and id attributes as well. You can use it with your
            LESS and SCSS files also.

            You can create new rules the same way. Click in one of the <!-- <p> --> tags above and press
            <kbd>Cmd/Ctrl + E</kbd>. There are no rules for it right now, but you can click the New Rule
            button to add a new rule for <!-- <p> -->.
        </samp>

        <a href="screenshots/quick-edit.png">
            <img alt="A screenshot showing CSS Quick Edit" src="screenshots/quick-edit.png" />
        </a>

        <p>
            You can use the same shortcut to edit other things as well - like functions in JavaScript,
            colors, and animation timing functions - and we're adding more and more all the time.
        </p>
        <p>
            For now inline editors cannot be nested, so you can only use Quick Edit while the cursor
            is in a "full size" editor.
        </p>

        <!--
            LIVE PREVIEW
        -->
        <h3>Preview HTML and CSS changes live in the browser</h3>
        <p>
            You know that "save/reload dance" we've been doing for years? The one where you make changes in
            your editor, hit save, switch to the browser and then refresh to finally see the result?
            With Brackets, you don't have to do that dance.
        </p>
        <p>
            Brackets will open a <em>live connection</em> to your local browser and push HTML and CSS updates as you
            type! You might already be doing something like this today with browser-based tools, but with Brackets
            there is no need to copy and paste the final code back into the editor. Your code runs in the
            browser, but lives in your editor!
        </p>

        <h3>Live Highlight HTML elements and CSS rules</h3>
        <p>
            Brackets makes it easy to see how your changes in HTML and CSS will affect the page. When your cursor
            is on a CSS rule, Brackets will highlight all affected elements in the browser. Similarly, when editing
            an HTML file, Brackets will highlight the corresponding HTML elements in the browser.
        </p>

        <samp>
            If you have Google Chrome installed, you can try this out yourself. Click on the lightning bolt
            icon in the top right corner of your Brackets window or hit <kbd>Cmd/Ctrl + Alt + P</kbd>. When
            Live Preview is enabled on an HTML document, all linked CSS documents can be edited in real-time.
            The icon will change from gray to gold when Brackets establishes a connection to your browser.

            Now, place your cursor on the <!-- <img> --> tag above. Notice the blue highlight that appears
            around the image in Chrome. Next, use <kbd>Cmd/Ctrl + E</kbd> to open up the defined CSS rules.
            Try changing the size of the border from 10px to 20px or change the background
            color from "transparent" to "hotpink". If you have Brackets and your browser running side-by-side, you
            will see your changes instantly reflected in your browser. Cool, right?
        </samp>

        <p class="note">
            Today, Brackets only supports Live Preview for HTML and CSS. However, in the current version, changes to
            JavaScript files are automatically reloaded when you save. We are currently working on Live Preview
            support for JavaScript. Live previews are also only possible with Google Chrome, but we hope
            to bring this functionality to all major browsers in the future.
        </p>

        <h3>Quick View</h3>
        <p>
            For those of us who haven't yet memorized the color equivalents for HEX or RGB values, Brackets makes
            it quick and easy to see exactly what color is being used. In either CSS or HTML, simply hover over any
            color value or gradient and Brackets will display a preview of that color/gradient automatically. The
            same goes for images: simply hover over the image link in the Brackets editor and it will display a
            thumbnail preview of that image.
        </p>

        <samp>
            To try out Quick View for yourself, place your cursor on the <!-- <body> --> tag at the top of this
            document and press <kbd>Cmd/Ctrl + E</kbd> to open a CSS quick editor. Now simply hover over any of the
            color values within the CSS. You can also see it in action on gradients by opening a CSS quick editor
            on the <!-- <html> --> tag and hovering over any of the background image values. To try out the image
            preview, place your cursor over the screenshot image included earlier in this document.
        </samp>

        <h3>Need something else? Try an extension!</h3>
        <p>
            In addition to all the goodness that's built into Brackets, our large and growing community of
            extension developers has built hundreds of extensions that add useful functionality. If there's
            something you need that Brackets doesn't offer, more than likely someone has built an extension for
            it. To browse or search the list of available extensions, choose <strong>File > Extension
            Manager…</strong> and click on the "Available" tab. When you find an extension you want, just click
            the "Install" button next to it.
        </p>

        <!--
            LET US KNOW WHAT YOU THINK
        -->
        <h2>Get involved</h2>
        <p>
            Brackets is an open-source project. Web developers from around the world are contributing to build
            a better code editor. Many more are building extensions that expand the capabilities of Brackets.
            Let us know what you think, share your ideas or contribute directly to the project.
        </p>
        <ul>
            <li><a href="http://brackets.io">Brackets.io</a></li>
            <li><a href="http://blog.brackets.io">Brackets Team Blog</a></li>
            <li><a href="https://github.com/adobe/brackets">Brackets on GitHub</a></li>
            <li><a href="https://brackets-registry.aboutweb.com">Brackets Extension Registry</a></li>
            <li><a href="https://github.com/adobe/brackets/wiki">Brackets Wiki</a></li>
            <li><a href="https://groups.google.com/forum/#!forum/brackets-dev">Brackets Developer Mailing List</a></li>
            <li><a href="https://twitter.com/brackets">@brackets on Twitter</a></li>
            <li>Chat with Brackets developers on IRC in <a href="http://webchat.freenode.net/?channels=brackets&uio=d4">#brackets on Freenode</a></li>
        </ul>

    </body>
</html>
<code>print('Hello')</code>
<!DOCTYPE html>
<html>
  <body>
    <pre>
      <code>
        >>> print  "papa bless."
      </code>
    </pre>
  </body>
</html>
pre {
    overflow: auto;
}
pre {
    white-space: pre-wrap;
}
<style>
    pre {
        display: block;
        font-family: monospace;
        white-space: pre;
        margin: 1em 0;
    }
</style>