Forum Moderators: open
When looking at the page in English it appears ok, but when I have the page translated into French using Google France, for example, the list and the text below it appears as some sort of font that the template contains.
This is what validator mentions (maybe it will help to figure out what might work, the greater than sign in <ul> is in red):document type does not allow element "ul" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag.
<ul>
The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
The code is the following:
<font face="arial" size="4"><strong>text here</strong></font><font face="arial" size="3"><br />
<br />
text here <br />
<br />
text here<font face="Verdana" size="3"><br />
<br />
<strong>text here</strong></font><font face="arial" size="3">
<ul>
<li><strong>text here </strong>text here </li>
<li><strong>text here </strong>text here
</li>
</ul>
text here<br />
<br />
<a href="file.html">click here</a></font><br />
<br />
</font>
Yes, being this precise in your mark-up will mean you are opening and closing font elements every time your page moves to a new block element, such as <p>, <ul> and so on. That creates very bloated code, which is just one of the failings of the font element and one of many reasons that it has been deprecated.
My best advice is do not write new source code today that uses the font element.
Does this mean that every bullet point will need to have its own opening and closing font tag with Arial as the font and the size specified as 3 in order for it to look that way?
Somthing like this: <li><font face="arial" size="3"><strong>text here </strong>text here</font> </li>
Is there any other way?
I know it is not good to use the font tag because it can created bloated code but for this I have to.
If you have access to the <head> section of your source code, you can place one style rule for all your <li> there. Something like this:
<style type="text/css">li{font-family:arial,sans-serif;font-size:100%;}</style>
If you cannot access the <head> section, then you are stuck with inline styles, and that means a style attribute for every <li> tag. Just a bit more economical than the <font> tag, but at least it's not deprecated.
<li style="font-family:arial,sans-serif;font-size:100%;">
The template that I use has Server-side Includes, and I think in there I might be able to put a style rule. Do you know possibly if Server-side Includes are in the <head> section of the source code?
Also, would I have to mention the equivalent a size 3 font in Arial in pts since it is CSS?
The inline code that you wrote looks good but that would increase the size of the code and I think I should try not to.
You can define the font-size in many ways. See [w3.org...]
Anyway, if you set the font property using CSS for the <ul>, it'll be inherited by the <li>'s in it
So if you want to write it inline, go for something like:
<ul style="font:1.05em Arial, Helvetica, sans-serif">
<li>one</li>
<li>two</li>
</ul>
A font-family really should be a list. E.g. Arial isn't available on *all* platforms, Helvetica looks more or less like it, and the sans-serif font is a universal one that the browser will choose if all those in front are missing. This list is a list of preferences: the first one the browser has available will be used. [Otherwise it'll become courier in many browsers]
I am going to try what Swa said about putting the style with <ul>.
If the template has trouble with inline CSS, then maybe I can do what Ted said.
I had one question that I had trouble finding the answer to. I needed to know for trebuchet ms size 2 what is the size in pixels? In pts I think it is a 10 but I could not find something on the internet that would give me the equivalent. This is something that I need to know.
I would appreciate if you could please help me.
Is it ok to have mostly that type of HTML and then maybe once or twice use inline CSS on a couple of pages?
It is not valid to do what you suggest, because of the font tags - but it will "work" for now.
If you go with all css: external, in the <head> and inline, the "cascade" will take care of any rules that seem to conflict. It will choose the inline style over any style declared in the head or the external style sheet.
You may find our "CSS Crash Course" useful: [webmasterworld.com...]
<percentage>
A percentage value specifies an absolute font size relative to the parent element's font size.[w3.org...]