Drop Cap

Posted on 2014-03-10
Last Modified: 2014-03-21
I understand how to use drop cap within <p>, but how do you use drop cap when using document.writeln?
Question by:Barbara69
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
LVL 58

Expert Comment

ID: 39917944
You would have to write an element (div etc) and style the element inline

document.writeln('<div style="add styles here">test</div>')

Author Comment

ID: 39918258
I'm not sure I understand. I tried what you suggested and nothing happend. I have document.writeln("Hi, my name is Barbara....") and I want to use drop cap on the H in Hi.
LVL 58

Expert Comment

ID: 39918271
Like this

document.writeln('<div style="float:left;font-size: 75px; line-height: 60px; ">H</div>i, my name is Barbara....')

Open in new window

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.


Author Comment

ID: 39928403
Wouldn't it be better to put the style in your suggestion in a css and do a <div class=""> or <p class=""> within the writeln?

Author Comment

ID: 39928408
I pressed enter before I was finished. I created a style, put it in my css file and put <p class=""> within the writeln.
LVL 58

Accepted Solution

Gary earned 500 total points
ID: 39929553
Which ever way works best for you, I was just giving an all in one solution.
div {float:left;font-size: 75px; line-height: 60px;}
document.writeln('<div>H</div>i, my name is Barbara....')

Open in new window


Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

726 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