Drop Cap

I understand how to use drop cap within <p>, but how do you use drop cap when using document.writeln?
Barbara69Asked:
Who is Participating?
 
GaryCommented:
Which ever way works best for you, I was just giving an all in one solution.
<style>
div {float:left;font-size: 75px; line-height: 60px;}
</style>
<script>
document.writeln('<div>H</div>i, my name is Barbara....')
</script>

Open in new window

0
 
GaryCommented:
You would have to write an element (div etc) and style the element inline
e,g,

document.writeln('<div style="add styles here">test</div>')
0
 
Barbara69Author Commented:
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.
0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

 
GaryCommented:
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

0
 
Barbara69Author Commented:
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?
0
 
Barbara69Author Commented:
I pressed enter before I was finished. I created a style, put it in my css file and put <p class=""> within the writeln.
0
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.

All Courses

From novice to tech pro — start learning today.