Html 在链接之间放置空格

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11519037/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 01:41:56  来源:igfitidea点击:

put spaces between links

html

提问by dato datuashvili

from my previous question i have success a little,but i have another questions so post here,here is my code

从我之前的问题来看,我取得了一些成功,但我还有其他问题,所以在这里发帖,这是我的代码

<html  >
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
</head>
<style>

#links { 
    margin: 0 auto; 
    width: 3000px; 
    font-size:70px;
    clear: both; 
    display: block;
}
#test a {
    float: right;
}
</style>
<body bgcolor="blue" >
<a href="indexE.html"><img src ='english.gif' style="float:right"  width="88" height="88"> </a>
<a href="indexR.html"><img src ='russian.gif' alt="Russian flag" style="float:right"  width="88" height="88"/>
<a href="index.html"> <img src="georgian.jpg"  style="float:right" width="88" height="88"/>
<div id="links">
<a href=" index.html " >??????? </a>
<a href=" ?????????.html ">????????? </a>
<a href=" ???????.html ">??????? </a>
<a href=" ????.html ">???? </a>
<a href=" ??????.html ">?????? </a>
<a href=" ???????.html ">??????? </a>
<a href=" ??????.html ">?????? </a>
<a href=" ??????.html ">?????? </a>
<a href=" ?????_???????.html ">?????_??????? </a>
</div>
</body>
</html>

i have two question

我有两个问题

1.when i run this code,it shows me names of links in large form,after i reload,it is good,so what is problem? and second question 2.i want to put spaces between names like this

1.当我运行这段代码时,它以大格式显示链接的名称,我重新加载后,它很好,那么有什么问题?第二个问题2.我想在这样的名字之间加空格

??????? ????????? ??????? ???? ?????? ??????? ?????? ?????? ?????_???????

??????? ????????? ??????? ???????????????? ???????????????????_???????

how could i do it?

我怎么办?

回答by arkascha

For question 2.): you could simply put a non breaking space in between:

对于问题 2.):您可以简单地在两者之间放置一个非中断空间:

<a href=" ??????.html ">?????? </a>
&nbsp;
<a href=" ???????.html ">??????? </a>
&nbsp;
<a href=" ??????.html ">?????? </a>

Which results in:

结果是:

??????   ???????   ??????

????????????? ??????

Or you can add paddings/margins inside your style definitions so that anchors ("a tags") reserve some space to the left and/or right. The latte certainly is the preferred way to go.

或者您可以在样式定义中添加填充/边距,以便锚点(“a 标签”)在左侧和/或右侧保留一些空间。拿铁当然是首选的方式。

回答by yogi

You could use &nbsp;for space, it is a valid HTML string for space so it'll be validated by W3C too.

您可以使用&nbsp;空格,它是空格的有效 HTML 字符串,因此它也会被 W3C 验证。

回答by Jon Taylor

indexR and index need closing </a>tags. Also for spaces use &nbsp;or css margins or padding.

indexR 和 index 需要结束</a>标签。也用于空间使用&nbsp;或 css 边距或填充。

回答by Bhuvan Rikka

use &nbsp;between links to get spaces

&nbsp;在链接之间使用以获取空格

<a href=" index.html " >??????? </a>&nbsp;
<a href=" ?????????.html ">????????? </a>&nbsp;
<a href=" ???????.html ">??????? </a>

回答by Dinesh Kumar

For using space in your html application use 1) Entity name

要在 html 应用程序中使用空间,请使用 1) 实体名称

&nbsp

 

; Or 2) Entity Number

; 或 2) 实体编号

&#160

 

;

;

回答by Nikos

You can use %20the HTML-ASCII syntax for the space character. I have found that sometimes &nbsp;doesn't work that well with links.

您可以%20对空格字符使用HTML-ASCII 语法。我发现链接有时&nbsp;效果不佳。