- allcatsmeow2
Learning To Code: HTML Part 6
Hello Dolls!
Finally, it's time for Part 6 of Learning How To Code: HTML!
Just as a reminder, this is our code so far:
Hi! I'm a basic presentation!
Next, we'll add set the width and height of the presentation. I set the width of the presentation by adding width:100px; and I set the height of the presentation by adding height:50px;. 100 and 50 are just the automatic sizes I set to the presentation. Feel free to test with several different amounts of pixels (px).Our code is now:
Hi! I'm a basic presentation!
When tested, the code prints out:Hi! I'm a basic presentation!
If the height and width aren't assigned, the width of the presentation will automatically be as long as the screen, and the height of the presentation will automatically be the height of the text.
Looks more like the original preview, doesn't it? It's almost done. Second to last, add text-align:center; to the code. The text is automatically aligned to the left side of the presentation unless the alignment of the text is set. Text-align: center; tells the computer to align the text to the center.
Continued in Part 7 . . .
GET TO KNOW OUR STARBLOGGERS
- midnightmonkey628 Featured post: "Styling Starplaza Favorites"
- 2010vampire Featured post: "The NEW Disney Wizards"
- Vulacano10624 Featured post: "CallieCon AMA - Q&A with Vulacano106 - Part 2"
- Justanother.19 Featured post: "5 Art Ideas- Get Creative!"
- PIMIENT0 Featured post: "Stranger Talks"
- allcatsmeow2 Featured post: "Cat-O-Ween Con: Black Widow Edition!"
- imweirdo Featured post: "My thoughts on a climate crisis"
- madmadeleine69 Featured post: "Sauteed Chicken Breast Pan Gravy"
- muge_derin Featured post: "Starcoin Outfits #12"