Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to increase the font size of one word only in the line?

Tags:

html

css

I have to increase the size of a word in a middle of a normal font-size sentence.

<p class="call">To book a consultation click here or call NOW</p>

How can I enlarge the NOW word in CSS? If I create new paragraph the word will go to the new line. Any advice appreciated.

like image 579
Vonder Avatar asked Jan 21 '11 12:01

Vonder


People also ask

How do I change the font size on just one text in Word?

To change the font size of selected text in desktop Excel, PowerPoint, or Word: Select the text or cells with text you want to change. To select all text in a Word document, press Ctrl + A. On the Home tab, click the font size in the Font Size box.

How do you change the font of only one letter in Word?

To do this, select the Home tab on the ribbon bar, then click the small arrow icon in the bottom right-hand corner of the Font section. Once the dialog box opens, you can choose the font that you wish to use. As well as changing the font itself, you can also change the style, size, and color of your text.

How do I increase the size of one word in 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. HTML5 do not support the <font> tag, so the CSS style is used to add font size.


2 Answers

<p class="call">To book a consultation click here or call <span class='bigger'>NOW</span></p>

with CSS

.bigger { font-size:200%; }
like image 126
Hogsmill Avatar answered Oct 05 '22 23:10

Hogsmill


  1. Decide why you want it to be bigger (the point is HTML is to describe semantics, not presentation, so you need to think about this sort of thing)
  2. Write appropriate semantic markup
  3. Apply CSS

Perhaps:

<p class="call">To book a consultation click here or call <em>now</em></p>

and in your stylesheet:

em {  /* or .call em, but you should aim for consistency in your styling */
    font-style: normal;
    font-size: 120%;
    text-transform: uppercase;
}
like image 35
Quentin Avatar answered Oct 06 '22 00:10

Quentin