Professional Documents
Culture Documents
Forms: Single Line Text Input Box
Forms: Single Line Text Input Box
HTML CSS
Structural Presentational
language language
STYLE RULE
● Composed of four parts: selector,
declaration, property, and value
● Selector - indicates the HTML
element you want to style
● Declaration - determines the
property and values of a selector
● Property - specifies characteristic
(ex. Colon, font-family, etc.); EXTERNAL CSS
followed by a colon
● change the look of entire website by
● Value - expresses specification of
changing just one file
a property; followed by a semicolon
● Each page must include a reference
to the external style sheet file inside
the <link> element
● The <link> element goes inside the
<head> section
TYPE OF CSS ● The external style sheet must be
saved with a .css extension
INLINE CSS ● <link rel=”stylesheet”
● Useful for styling a single element href=”filename.css>
● Using the style attribute
STEPS IN USING EXTERNAL CSS
1. Create a folder in your root - can apply style rules to
directory. specific HTML tags
2. Save the HTML file in that folder. - can control individual HTML
3. Save the style.css file in that folder. element formatting
4. Run/Open the HTML file using any ● Defined by dots (.).
browser. ● There are two ways in writing class:
- Indicating the HTML element
DISPLAY PROPERTIES followed by a dot (p.sample)
● Block level - laid out vertically - class name preceded by a
● Inline level - laid out horizontally dot (.sample)
DIV TAG
● <div></div>
CLASS ID SELECTOR
● Divides the contents of a webpage SELECTOR
into sections
● Apply styles to different sections of A style applied to a A style element
a web page particular set of applied to one
● Provide line spacing before and elements element on a page
after a block element Defined by # and
● Block level element - applied to uses the attribute
block HTML and should not be used "id"
within a paragraph
MULTIPLE SELECTORS
SPAN TAG ● When two or more selectors have
● Inline level element - usually the same properties and values, a
applied to block HTML and should comma is used to separate the
not be used within a paragraph. selectors and only use one set of
● Emphasize words/sentences properties and values