Colors & Fonts Building a Website Lesson 7. Font Font The tag specifies the font face, font size,...
-
Upload
clarissa-golden -
Category
Documents
-
view
213 -
download
1
Transcript of Colors & Fonts Building a Website Lesson 7. Font Font The tag specifies the font face, font size,...
![Page 1: Colors & Fonts Building a Website Lesson 7. Font Font The tag specifies the font face, font size, and color of text. The tag can have any or all of these.](https://reader035.fdocuments.in/reader035/viewer/2022072006/56649f485503460f94c69de5/html5/thumbnails/1.jpg)
Colors & FontsBuilding a Website Lesson 7
![Page 2: Colors & Fonts Building a Website Lesson 7. Font Font The tag specifies the font face, font size, and color of text. The tag can have any or all of these.](https://reader035.fdocuments.in/reader035/viewer/2022072006/56649f485503460f94c69de5/html5/thumbnails/2.jpg)
Font <font>The <font> tag specifies the font face, font size, and color of text.
The <font> tag can have any or all of these attributes: face, size, color.
Code Browser<font face=“verdana” size=“5” color=“red”>Look at my color!</font>
Look at my color!
![Page 3: Colors & Fonts Building a Website Lesson 7. Font Font The tag specifies the font face, font size, and color of text. The tag can have any or all of these.](https://reader035.fdocuments.in/reader035/viewer/2022072006/56649f485503460f94c69de5/html5/thumbnails/3.jpg)
Style <style> Attribute
The style attribute can be used for change the background color or alignment of text.
To change the background color, add the style attribute to the body<body> element.
The alignment of text property can be used for each individual heading (<h1>, <h2>, etc.) or paragraph <p> element.
![Page 4: Colors & Fonts Building a Website Lesson 7. Font Font The tag specifies the font face, font size, and color of text. The tag can have any or all of these.](https://reader035.fdocuments.in/reader035/viewer/2022072006/56649f485503460f94c69de5/html5/thumbnails/4.jpg)
Background ColorTo change the background color, add the style attribute with background-color property to the body element.
Code Browser<body style=“background-color:black”> <p><font color=“orange”>This is Halloween</font></p></body>
This is Halloween
![Page 5: Colors & Fonts Building a Website Lesson 7. Font Font The tag specifies the font face, font size, and color of text. The tag can have any or all of these.](https://reader035.fdocuments.in/reader035/viewer/2022072006/56649f485503460f94c69de5/html5/thumbnails/5.jpg)
Text AlignmentText is left-aligned by default.
You can add the text-align property to the style attribute to center the text or right-align the text.
Code Browser<body style=“background-color:yellow”> <p style=“text-align:center”>This is centered text.</p></body><body style=“background-color:red”> <p style=“text-align:right”>This is right-aligned text.</p></body>
This is centered text.
This is right-aligned text.
![Page 6: Colors & Fonts Building a Website Lesson 7. Font Font The tag specifies the font face, font size, and color of text. The tag can have any or all of these.](https://reader035.fdocuments.in/reader035/viewer/2022072006/56649f485503460f94c69de5/html5/thumbnails/6.jpg)
Exit TicketIn HTML, write the code for your name with the following properties:
Yellow font
Blue Background
Centered Text