Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

increase font size of hyperlink text html

I am working on web application where I have taken href. But the default font of it is too small when comparing to the page. So I want to increase the size of the font.

My output page look like below:

enter image description here

I have tried by font size for anchor tag but it doesn't show any effect after the font tag.

Code I have tried is:

<font size="100px"><a href="selectTopic?html" style="text-decoration: none">HTML 5</a></font>

So how can I change the font size?

like image 673
Aniket Avatar asked Mar 02 '13 13:03

Aniket


People also ask

How do I make font bigger in hyperlink HTML?

To change the font size in HTML, use the style attribute. The style attribute specifies an inline style for an element. The attribute is used with the HTML <p> tag, with the CSS property font-size.

How do I change the link font in HTML?

To change font size in HTML, use the CSS font-size property. Set it to the value you want and place it inside a style attribute. Then add this style attribute to an HTML element, like a paragraph, heading, button, or span tag.

How do I change the font size of a hyperlink?

Here's how: Click the cell with the hyperlink. On the Home tab, right-click the Hyperlink style and pick Modify. If you don't see the Hyperlink style, click the arrow to expand the style gallery. In the Style box, click Format. Click Font, choose your formatting options and click OK. Click OK to close the Style box.

How to change the font size of the text in CSS?

The selector can either be our HTML tag or maybe a class or an ID. For example: // HTML <p> Any text whose font we want to change </p> // CSS p { font-size: 14px; }

How do I set the font-size for my HTML content?

Always use the proper HTML tags, like <h1> - <h6> for headings and <p> for paragraphs. The font-size value can be an absolute, or relative size. Note: If you do not specify a font size, the default size for normal text, like paragraphs, is 16px (16px=1em). Tip: If you use pixels, you can still use the zoom tool to resize the entire page.

How to increase the size of text in HTML5?

But that was before HTML5. Then we added text using the <font> tag, which can take in an attribute of size as seen below: This size attribute can take in value from 1-7 in which the text size increases from 1 to 7. But like I said, this has long been depreciated, and most people don't even know it existed.


4 Answers

You can do like this:

a {font-size: 100px}

Try avoid using font tag because it's deprecated. Use CSS like above instead. You can give your anchors specific class and apply any style for them.

like image 139
Eli Avatar answered Oct 18 '22 04:10

Eli


Your font tag is not correct, so it won't work in some browsers. The px unit is used with CSS, not HTML attributes. The font tag should look like this:

<font size="100">

Well, actually it shouldn't be there at all. The font tag is deprecated, you should use CSS to style the content, like you do already with the text-decoration:

<a href="selectTopic?html" style="font-size: 100px; text-decoration: none">HTML 5</a>

To separate the content from the styling, you should of course work towards putting the CSS in a style sheet rather than as inline style attributes. That way you can apply one style to several elements without having to put the same style attribute in all of them.

Example:

<a href="selectTopic?html" class="topic">HTML 5</a>

CSS:

.topic { font-size: 100px; text-decoration: none; }
like image 33
Guffa Avatar answered Oct 18 '22 03:10

Guffa


increase the padding size of font and then try to increase font size:-

style="padding-bottom:40px; font-size: 50px;"
like image 2
abhay Avatar answered Oct 18 '22 05:10

abhay


you can add class in anchor tag also like below

.a_class {font-size: 100px} 
like image 1
www.wishinfo.net Avatar answered Oct 18 '22 04:10

www.wishinfo.net