CSS:在<pre>` element

时间:2015-04-23 05:13:35

标签: html css

There is web-site for Nodeclipse FOSS project http://www.nodeclipse.org/

I am not quick at web development and styles, and there is problem I don't know how to approach:

On the main page http://www.nodeclipse.org/index.html there is <pre> element (source line) and after it style is always different than at pragraph start.

example

I guess there's something to be in applied http://www.nodeclipse.org/pipe.css" (source), but what to look for? (As it is not about pre element but what happens after it)

FOSS project needs help with web.

1 个答案:

答案 0 :(得分:1)

As you can see, <pre> tag usage inside <p> tag breaks the DOM structure

enter image description here

So the text after pre tag are not enclosed inside the <p> tag.

It is not advised to use pre tag to display a content that doesn't lose it's meaning if not pre-formatted.

So use a <a> tag or some other suitable tags like span (if you don't want it to be a clickable link) to display the url and style it accordingly.