Tuesday, September 13, 2011

How to change the font size in a single line in html using header tags?

I know only basics of html . this is the code i used in my code.

%26lt;h3%26gt; Contact Details %26lt;/h3%26gt; %26lt;h5%26gt; mention the complete details %26lt;/h5%26gt;.if i use this i will get in two separate lines . but i want to get them on the same lines .what is the correct code to be written to get the required result.How to change the font size in a single line in html using header tags?
Use the following code %26lt;font size=';font size';%26gt;...%26lt;/font%26gt;

where the ';font size'; is enter a number 1-8 the %26lt;/font%26gt; ends the command



So for example

%26lt;font size=';3';%26gt;Contact Details%26lt;/font%26gt; %26lt;font size=';5';%26gt;mention the complete details %26lt;/font%26gt;How to change the font size in a single line in html using header tags?
In your CSS file/section declare:



.nobr {white-space: nowrap}



Then in HTML use :



%26lt;span class=';nobr';%26gt;%26lt;h3%26gt; Contact Details%26lt;/h3%26gt; %26lt;h5%26gt; mention the complete details%26lt;/h5%26gt;%26lt;/span%26gt;



BTW., from the content of what you are trying to do, it looks like you are using the HTML header tags wrong. They really should be used ONLY to outline sections in your HTML, not to make text look bigger/bolder.



Also, don't listen to the guy with the FONT tag suggestion. FONT tag has been deprecated since HTML 4.0, which was 10 years ago. Use CSS.

No comments:

Post a Comment