0% found this document useful (0 votes)
9 views9 pages

X 9

Uploaded by

hlemorvan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
9 views9 pages

X 9

Uploaded by

hlemorvan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 9
2er112023 09.08, HTML Styles Tutorials Exercisesw Servicesey§ QO Login schools HTML Styles [crv] Looe | The HTML style attribute is used to add styles to an element, such as color, font, size, and more. Example Tam Red Tam Blue I am Big The HTML Style Attribute Setting the style of an HTML element, can be done with the style attribute. The HTML style attribute has the following syntax nitpsdimww:vdschools.comihimiihtml_styles.asp 2er112023 09.08, HTML Styles 3 w Tutorialsy —Exercisesw Servicese§ QO Log in schools The property is a CSS property. The value is a CSS value. You will learn more about CSS later in this tutorial Background Color The CSS background-color property defines the background color for an HTML element. Example Set the background color for a page to powderblue:

This is a paragraph.

Example Set background color for two different elements:

This is a heading

This is a paragraph.

nitpsdimww:vdschools.comihimiihtml_styles.asp 219 2er112023 09.08, HTML Styles w Tutorials Exercisesw Servicesey§ QO Login Text Color The CSS color property defines the text color for an HTML element: Example

This is a heading

This is a paragraph.

Fonts The CSS font-family property defines the font to be used for an HTML element: Example chi style="font-family:

This is a paragraph.

erdana;">This is a heading nitpsdimww:vdschools.comihimiihtml_styles.asp a9 2er112023 09.08, HTML Styles 3 w Tutorialsy —Exercisesw Servicese§ QO Log in schools Text Size The CSS font-size property defines the text size for an HTML element Example

This is a heading

This is a paragraph.

Text Alignment The CSS text-align property defines the horizontal text alignment for an HTML element: Example

Centered Heading

Centered paragraph.

Chapter Summary * Use the style attribute for styling HTML elements * Use background-color for background color * Use color for text colors * Use font-family for text fonts nitpsdimww:vdschools.comihimiihtml_styles.asp 49 2er112023 09.08, HTML Styles 3 w Tutorialsy —Exercisesw Servicese§ QO Log in schools HTML Exercises Exercise: Use the correct HTML attribute, and CSS, to set the color of the paragraph to “blue”.

This is a paragraph.

Start the Exercise nitpsdimww:vdschools.comihimiihtml_styles.asp 59 2er112023 09.08, HTML Styles 3 w Tutorials Exercisesw Servicesey§ QO Login NW a€ eee schools See eC Peco nears ern COLOR PICKER nitpsdimww:vdschools.comihimiihtml_styles.asp as 2er112023 09.08, Tutorialse Exercises schools Services HIML Styles Q 0 Log in Create a Free Website Sharpen and Master your a with these technologies TRY ETeINy o1¢[aoon Get Spaces! w schools SPACES GET CERTIFIED Top Tutorials nitpsdimww:vdschools.comihimiihtml_styles.asp + Pore UPGRADE NEWSLETTER REPORT ERROR 119 2er112023 09.08 w schools Tutorials css Exercises» Services JAVASCRIPT SQL. PYTHON W3.cSS Tutorial Bootstrap Tutorial PHP Tutorial Java Tutorial C++ Tutorial jQuery Tutorial Top References HTML Reference SS Reference JavaScript Reference SQL Reference Python Reference W3.CSS Reference Bootstrap Reference PHP Reference HTML Colors Java Reference ‘Angular Reference Query Reference Top Examples HTML Examples SS Examples JavaScript Examples How To Examples SQL Examples Python Examples Wa.CSS Examples Bootstrap Examples PHP Examples Java Examples XML Examples JQuery Examples G@ @ ® © Forum asour W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning HmML styles Q 0 JAVA PHP Get Certified HTML Certificate css certificate JavaScript Certificate Front End Certificate SQL Certificate Python Certificate PHP Certificate Query Certificate Java Certificate c++ Certificate i Certificate XML Certificate Sign Up How TO Login W3.css Tutorials, references, and examples are constantly reviewed to avold errors, but we cannot warrant full correctness of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookie and privacy policy. Copyright 1999-2023 by Refsnes Data. All Rights Reserved. W3Schools is Powered by htipsutmaew.wdechoots.comihtmi/himl_styles. ase c as 2er112023 09.08, HTML Styles 3 w Tutorials» —Exercisese Servicese§ QU O SignUp Login schools = CSS JAVASCR SQL PYTHON JAVA PHP = HOWTO. —-W3,CSS_—C htipsutmaew.wdechoots.comihtmi/himl_styles. ase a9

You might also like