简体   繁体   English

我应该在哪里在html文件中添加css?

[英]Where should i add css in html file?

I was trying to add css in my blogger's blog but for some reason blogger theme designer is not working so i decided to add css directly in the code using tags, but I can't find the tag in the html file.我试图在我的博主的博客中添加 css,但由于某种原因博主主题设计器不起作用,所以我决定使用标签直接在代码中添加 css,但我在 html 文件中找不到该标签。 It is my first time when I am unable to understand where is.这是我第一次无法理解在哪里。 Anyone know where tag is in this file to add css?任何人都知道这个文件中的标签在哪里添加css? I did not Code it completely!我没有完全编码它! And the person who did is no longer in contact with me!而那个做的人也不再和我联系了!

Click Here to see Code点击这里查看代码

To use an external style sheet, add a link to it in the section of the HTML page:要使用外部样式表,请在 HTML 页面的部分中添加指向它的链接:

<head>
  <link rel="stylesheet" href="styles.css">
</head>

Search for this ]]></b:skin> and place your CSS code before it without using <style>搜索此]]></b:skin>并将您的 CSS 代码放在它之前,而不使用<style>

Or if you want to use a style tag, place it after </b:skin>或者如果你想使用样式标签,把它放在</b:skin>

The <style> element is used to add CSS style rules to an HTML document. <style>元素用于向 HTML 文档添加 CSS 样式规则。 The element is expected to appear in the document <head> , but will also render acceptably when used in the <body> of the document.该元素应出现在文档<head> ,但在文档的<body>中使用时也会呈现可接受的效果。

Your program should look like this你的程序应该是这样的

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="styles.css">
</head>
<body>

<h1>This is a heading</h1>
<p>This is a paragraph.</p>

</body>
</html>

you should add the head tag yourself to the top of the document if you do not have one already.如果您还没有 head 标签,您应该自己将 head 标签添加到文档的顶部。 for the href change that to the name of your css file.对于 href 将其更改为您的 css 文件的名称。

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html>
<HTML amp='amp' lang='en'>
<head>
<meta charset='utf-8'/>
<meta content='width=device-width, initial-scale=1, minimum-scale=1' name='viewport'/>
<!--[if ie]><meta content='IE=9; IE=8; IE=7; IE=EDGE; chrome=1' http-equiv='X-UA-Compatible'/> <![endif]-->
<meta content='blogger' name='generator'/>
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
<link href='https://justpaste.it/redirect/3qnyk/http://www.blogger.com/openid-server.g' rel='nofollow'/>
<link expr:href='' rel='nofollow'/>
<link expr:href='' rel='nofollow'/>
</head>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM