我正在编写一个网站,但粗体和斜体不起作用[关闭]

问题描述 投票:-4回答:1

我正在努力建立一个网站(Sponge),当我尝试做大胆的事情时,我就不会工作了!看看它,看看它有多烦人!

我的代码:Hastebin

google-chrome web bold italic
1个回答
0
投票

标题标签<h#>默认情况下经常使用font-weight: bold。我不确定为什么你的所有文本都在标题中,但它可能不应该。

将大部分文本放在段落<p>标记中并调整CSS以格式化段落的方式,使用:

p { /*Style goes here*/ }

或者,您可以将一个类应用于段落,以单独或成组调整其样式。如果你不确定如何,Google是一个CSS教程。

这只是对代码的快速编辑。它不会是完美的,但希望它能引导你走向正确的方向。

<!DOCTYPE html>
<html>
<head>
<title>Sponge - Home</title>
<link href="https://fonts.googleapis.com/css?family=Quicksand" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<style>
.hotbar {
    background-color: #808080;
    height: 20%;
    width: 100%;
    font-family: 'Quicksand', sans-serif;
}
.about {
    font-family: 'Roboto', sans-serif;
}
</style>
</head>
<body>
<div class="hotbar" height="7%" width="100%">
<img align="left" src="http://www.spongemc.cf/home/images/logo.png" alt="logo" height="7%" width="7%">
<h1 align="center"><a style="text-decoration: none;" href="http://www.spongemc.cf/home/">Home</a></h1>
</div>
<div class="about">
<br /> <!-- Assuming all those empty header tags for for spaces - you could also use padding-top in the div or margin-top for the first h2 tag -->
<h2>What are we?<h2>
<p>We are a Minecraft server dedicated to people having fun!</p>
<p>You can have fun and play prison at <i>Sponge.minehut.gg</i>,</p>
<p>or you can play farming and Skyblock at <i>spongemc.net</i></p>
<p>Or you could just sit there doing nothing (I don't recomend this),</p>
<p>so what are you doing, <b>JOIN NOW!</b></p>
</div>
</body>
</html>
© www.soinside.com 2019 - 2024. All rights reserved.