首页 > 解决方案 > 有没有像“:”这样的东西,我应该在给一个词上色时出现?(HTML)

问题描述

我正在写一段关于水果投资的文章。为了让它有经验,我根据水果的颜色给水果词上色:

<h1> Cantaloupes </h1><br>
<p> Cantaloupes is this type of melon that can be used as a fruit, like for drinking a refresher! 
They are used to make juice. It's this avocado looking fruit that has the outside as a different color.

等等。我想<script>用里面做一个属性<style>,所以我可以为文章中“哈密瓜”的数量着色。我怎么能<style>在这个里面使用,如果我不能,我怎么能用它<style>来画“哈密瓜”字?

标签: htmlcsscolorsattributesparagraph

解决方案


<p>
<span style="color: yellow">Cantaloupes</span> is a type of <span style="color: green">melon</span> that can be used... 
</p>


推荐阅读