Website Design Using HTML and CSS
Website Design Using HTML and CSS
Adding Comments:
to help other programmers to keep reminders to hide some codes
Comments Syntax:
<!-- Your comment here -->
Tasks: 1. Think of a website name 2. Create a tagline 3. Create a welcome remark 4. Make a web description 5. Give your contact details
Inline Style
Similar to formatting text in Word documents Applies a style to a single element
Example
<p style=color: red; fontweight: bold;>The Q-B-F-JO the L-D.</p>
Span Element
<p><span style=color: blue; font-weight: bold;>The Q-BF-J-O</span>the L-D.</p>
Embedded Style sets out the style to be used on a page placed before the closing </head> tag done by using a style element
External Style Sheets - location to place styles on ALL your web pages
p{
font-weight: bold; color: blue }
Type this line before the closing head tag of your index.html file
<link href=style1.css rel=stylesheet type=text/css />
Styling Options
Property Color Values Use color keywords or hexadecimal values
Font-family
Font-size
Relative: a percentage (e.g. 100%); em units (1em) Fixed: pixels (e.g. 20px); points (e.g. 12pt)
Inline Style
CSS
Embedded Style
Block-level Elements normally displayed in its own line used as container for other elements
Inline Elements sits inside another element may be placed inside another inline element
Note: inline elements gives limited styling options: change color and font properties
Note: block-level elements may be used to assign fixed text width and height create padding effects assign a block location
Selectors contextual uses the ID class defines a style that can be used over and over to style different elements
Setting the Width Each block-level elements width and height can be assigned using the width and height properties