W3Schools - HTML (HTML Comments, HTML Colors, HTML CSS)

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

class Attribute

To define a style for a special type of elements (plural), add a ___ ___ to the element, then define a style for the elements with the specific ___.

External Style Sheet

With an ___ ___ ___, you can change the look of an entire web site, by changing one file! - to use an ___ ___ ___, add a link to it in the <head> section of the HTML page. - can be written in any text editor. The file must not contain any HTML code, and must be saved with a .css extension.

RGB Values

In HTML, a color can also be specified as an ___ ___, using this formula: rgb(red, green, blue). - each parameter (red, green, and blue) defines the intensity of the color between 0 and 255. - Ex: rgb(255,0,0) is displayed as red, because red is set to its highest value (255) and the others are set to 0. - shades of gray are often defined using equal values for all the 3 light sources:

How to Add Comments to HTML

Syntax: <!-- Write your comments here --> - notice that there is an exclamation point (!) in the opening tag, but not in the closing tag. - comments are also great for debugging HTML, because you can comment out HTML lines of code, one at a time, to search for errors.

CSS "padding" Property

This defines a padding (space) BETWEEN the text and the border (space is declared within the border). - used for space INSIDE the border

Inline CSS

This is used to apply a unique style to a single HTML element. An inline CSS uses the style attribute of an HTML element.

Internal CSS

This is used to define a style for a single HTML page. - an ___ ___ is defined in the <head> section of an HTML page, within a <style> element.

3 Ways for CSS to be added to HTML

- 1.) Inline - by using the style attribute in HTML elements - 2.) Internal - by using a <style> element in the <head> section - 3.) External - by using an external CSS file - the most common way to add CSS, is to keep the styles in separate (external) CSS files.

Hex (Hexadecimal) Values

In HTML, a color can also be specified using a ___ value in the form: #RRGGBB, where RR (red), GG (green) and BB (blue) are ___ values between 00 and FF (same as decimal 0-255). - Ex: #FF0000 is displayed as red, because red is set to its highest value (FF) and the others are set to the lowest value (00). - shades of gray are often defined using equal values for all the 3 light sources: #404040, #808080, #CCCCCC, etc...

How to Specify Colors in HTML

In HTML, a color can be specified by using a: 1) color name; 2) RGB value; or 3) a HEX value.

CSS "border" Property

The CSS ___ property defines a border around an HTML element. - Syntax: border: border-width border-style border-color | initial | inherit;

CSS "margin" Property

The CSS margin property defines a margin (space) OUTSIDE the border. - used for space OUTSIDE the border

id Attribute

To define a specific style for one special element (singular), add an ___ ___ to the element, then define a style for the element with the specific ___. - The ___ of an element should be unique within a page, so the ___ selector is used to select ONE unique element!


संबंधित स्टडी सेट्स

CoursePoint Chapter 1, 3, & 24 Questions

View Set

Chapter 45 NCLEX style questions

View Set

CFA Level I: Portfolio Management

View Set

The Cold War and American Culture

View Set

Small Business Management Chapter 6

View Set

Person Chapter 4 (Sentence Fragment and Sentence Combination Errors)

View Set

Psyc 360 Intro to Personality Final Exam

View Set

Unit 5- Earth & Environmental Science

View Set