Classes and IDs
classes and IDs exist to help elements interact with and be manipulated by CSS selectors. classes and IDs are usually declared using the class= or id= attributes.
This is a paragraph with a class of 'class-para'.
This is a paragraph with an id of 'id-para'.
In CSS, Classes are selected using a dot (.) and IDs are selected using a (#).
Using CSS with HTML
When using CSS to style HTML elements, you should always use an external stylesheet. Unless it is for demo purposes, you should never write CSS directly into an HTML document.
Block and Inline
Block elements take up the entire widthof a box. Inline flows on the same line.
Examples of block: p, div, ul, , ol, li, h1-h6
Inline examples:span, a, img, strong, em
Samples of Block Elements
- UL and LI elements are block elements.
- They stand for unordered list.
Samples of Inline ElementsThis is Inline. Google
Linking HTML pages and working with multiple pages
index.html file is compliant for homepage.
it is recommended that different pages share same styling and structure. so it is not uncommon to copy codes.Go to About Page