html inline tag

Posted on 2013-10-04
Medium Priority
Last Modified: 2013-10-04
I have a line of text:

This is the line of text. I need the word line to be with specific attributes. The font tag is no longer accepted in html5 and all inline styles seem to require a paragrah.

Is there an inlie tag I can use to set fixed attributes to a specific word or sentence
Question by:robrodp
  • 2
  • 2
LVL 58

Expert Comment

ID: 39547732
You just use style="". e.g.

<div style="font-size:19px">Some text</div>

Author Comment

ID: 39547752
The proble is that after the </div> it inserts a linefeed

My test is here shows ok

But <div style="font-size:19px">My test</div> is here

Shows as:

My Test
is here
LVL 58

Accepted Solution

Gary earned 2000 total points
ID: 39547782
A div is a block element meaning it will take up the full width of the screen
Change it to a span which is an inline element - inline means it will only take up as much as room as needed for the content

<span style="font-size:19px">My test</span> is here

Author Closing Comment

ID: 39547796
Great thx

Featured Post

Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
The first step to building an amazing About page is to figure out what you want the page to say about your company. You then must grab the attention of the reader, boast a bit, tell a story and let others brag about you. With a little bit of thought…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…

586 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question