|
|
How do I change text formatting in HTML?This is a really basic question, but I'm still just trying to figure all this Internet stuff out. I don't know any HTML. I would like to know how to a) place HTML in my coding to turn a paragraph color to red and b) increase the font size. Nothing wrong with being at the beginning of the journey of learning about HTML and the Web. You're definitely not alone and, frankly, there are precious few people who aren't somewhere on that road too, even if sometimes it seems that they're unimaginably far ahead. :-) It turns out that there are two different ways to accomplish what you seek within the HTML world, one that's an old-fashioned style that is pretty much obsolete, but still works, and the other, Cascading Style Sheets, that's much more powerful, albeit a bit more complex. Let's start with the simple solution. To make text red, simply preface it with <font color="red"> and end with </font>. You can increase the font size, on a scale of 1 to 7, where 7 is pretty large and 1 is pretty tiny, also using the font tag, just with what we HTML folk call a different attribute. This time, instead of using color, use size="x", where you replace x with the number of your choice. Here's how it might all fit together: This sentence has a word buried within it that
will be shown as <font size="6" color="red">big and red</font> when displayed. Not too hard, I hope. The smarter, cooler, and frankly more powerful solution, however, is to use Cascading Style Sheets. With style sheets, you simply specify style= and then use "name: value;" pairs to get the exact result you seek. Colors are fairly similar, but font size can be specific in a zillion different ways. To keep things simple, let's use relative sizing and specify 150%: This sentence has a word buried within it that
will be shown as <span style="color:red;font-size:150%">big and red</span> when displayed. The reason that CSS is a better solution is because it allows you a tremendous level of control over the presentation of text, from colors to typefaces, size to letter and word spacing, and even line spacing in paragraphs. Far more capability than even the best standard HTML code. If you'd really like to learn more about HTML and CSS, then may I suggest that my best-selling book Creating Cool Web Sites with HTML, XHTML, and CSS could be a splendid place to start.
More Useful HTML, JavaScript and Web Site Programming Articles:
✔ How to Create Predefined Google Image Search Links?
Thanks for the Amazon URL [see Creating Amazon Search Links]. That worked beautifully. In fact, I sent you $5.00 for coffee in thanks....
✔ Can I embed a Facebook search box on my blog site?I've seen your articles about how to add a Twitter or Google search box on a Web page, but I have a tougher...
✔ Can I use CSS for drop shadows on my blog?I want to give my site a bit of a facelift and add some neat graphical elements. One of which is drop shadows....
✔ How can I embed interactive photo panoramas on my site/blog?I read through your blog entry about how to take panoramic photos with iOS 6 and an iPhone 5 and got enthused. I've...
✔ How can I create a Twitter search URL shortcut?I'd like to add a few Twitter search links to my Web site. Is that possible, or does Twitter prohibit this sort of...
Let's stay in touch!
Sign up for my weekly AskDaveTaylor Newsletter and you'll receive even more tech and gadget help
right to your inbox, along with exclusive news and industry updates. It's good stuff. I promise!
Categorized:
HTML, JavaScript and Web Site Programming
(Article 4225,
Written by Dave Taylor)
Tagged: html, html 5, styles, web site customization Previous: Change password on child's AOL (America Online) screen name? Next: What is Tagyu? Reader Comments To Date: 5Mike Lambert said, on August 28, 2008 4:18 AM:
I am running under an old version of Office (Office 97) and can't reinstall it to enable the .html file type. Are there any downloads to convert a text or .doc document to an html file? - I am retired and trying to learn HTML from scratch. Thanks. Brett said, on January 24, 2010 3:40 PM:
Hi, I am New To Building With HTML and owuld just like to ask what host I should use for my FTP. I am currently using GoDaddy.com but they don't really have it that well thought out (in my opinion). Shirley said, on June 17, 2010 9:59 AM:
I just tried to change some things on my website. I have not done this in a year or so and thought I would remember how to do it. But sadly I must not have remembered. I changed some things on my index page in Notepad and stupidly saved the changes in .txt instead of .html. Now all my pages have the Notepad logo. How can I fix this. The pages will show up correctly if I right click on the file and open using firefox or IE. When I double click on them they come up in Notepad. Thank you so much. Shirley said, on June 17, 2010 11:10 AM:
Hi, I posted a question earlier today concerning .txt and .html. I think I figured out how to fix it. I right clicked on the file went to properties and changed what to open it with. I don't think it was saved as .txt after all but was still .html but opening with Notepage instead of Firefox. Thank you for your website.
I do have a comment, now that you mention it!Check This Out Too... |
Recent Entries
Look for Answers
Recommended
All Our Categories
Apple iPad Help
Articles and Reviews Auctions and Online Shopping Blogs and Blogging Building Web Site Traffic Business and Management Computer and Internet Basics d) None of the Above Facebook Help Google Gmail Help Google Plus Help HTML, JavaScript and Web Site Programming Industry News and Trade Shows iPhone and Cell Phone Help iPod, Sony PSP and MP3 Player Help Kindle Fire Help Mac OS X Help Pay Per Click (PPC) Advertising Pinterest Help Search Engine Optimization (SEO) Shell Script Programming Tech Support Video Help The Writing Business Twitter, LinkedIn and Social Network Help Unix and Linux Help Video Game Tips and Help Windows PC Help Find Me on Google+ ADT on G+ |
How do I make letters change colors and flash brightly in Html code?