HTML CSS i need help with html css font size


#1







Some text for you to make tiny!


Some text for you to make normal size!


Some text for you to make super big!




#2

@tobuscus45,
As your HTML code is NOT visible, you have to place your code in </> pre-code mode

Please re-edit your Post

  • select your code in the Post
  • then =click= on the </>-symbol-of-this-editor

Your code will then be in a pre-code state
and you will be able to make/present the proper indentations.


#3
Hey there,

Mine looked a little like this..
	<body>
		<p style="font-size: 10px"> Some text for you to make tiny! </p>
		<p style="font-size: 20px"> Some text for you to make normal size!</p>
		<p style="font-size: 40px"> Some text for you to make super big!</p>
	</body>

When editing the font sizes in HTML you need to address the 'style' of each paragraph 'tag' separately. The property 'font-size' must be adjusted and I think they give you values to set each paragraph to which are all in pixels (px).

As a single example, to make the text between paragraph tags
30px, we must write:

<p style="font-size: 30px"> This is the paragraph being made 30px in size </p>

#4

Here's another possibility to consider;

HTML CODE;

<div class ="p-size-10px">
    <p>Text with size 10px</p>
</div>

<div class ="p-size-20px">
    <p>Text with size 20px</p>
</div>

<div class ="p-size-30px">
    <p>Text with size 30px</p>
</div>

CSS CODE;

.p-size-10px p {
    font-size: 10px;
}

.p-size-20px p {
    font-size: 20px;
}

.p-size-30px p {
    font-size: 30px;
}

Hope it helped! :sun_with_face:


#5

i got to be honest, i find your solution a bit overcomplicated, yes, it is possible, yes it will work, but a bit unnecessary, i am not trying to shoot you down. but there is (beside the overcomplicated thing) another problem, external stylesheets are not covered yet, so css code is great, but people at this point in the course, do not know what a external stylesheet nor an internal stylesheet is


#6

You're right... thanks for informing me.

I haven't taken the courses here and was not aware that they didn't learn about external style sheets. I'll keep this in mind when posting responses; thank you so much! :smiley: