Classes and IDs
Classes and IDs exist in HTML to help elements interact with and be manipulated bu CSS selectors. Classes and Ds are usually declared using 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 select using a (#).
Using CSS with HTML
When using CSS to style a HTML Elements, you should always use an external stylesheet Unlesss it is for demo purposes, you should neverwrite CSS directly into a n HTML document.
Block and InlineInd HTML, and CSS, there are two types of elements. Block elements and Inline Elements. Block Elements take up the entire width of a box. Inine Elements, flow on the same line
Examples of Block of Elements: p, div, ul, ol, li, h1, h2, h5, h6
Examples of Inline Elements: span, a, img, strong, em
Samples of Block Elements
- UL and LI elements are block elements.
- THey stand for unordered list, and list item
Headings (h1 - h6) Are Block Elements
Samples of Inline ElementsThis is an inLine. Google
Linking HTML Pages and Working with Multipe Pages,
Websites are composed of multiple HTML pages tahta all share the same stylesheet. These different pages, are often linked together to form a navigation system for the website.
It is typical, that the index.html file is used as the homepage for a website. This is because most browsers will search out an index.html file to display first.
Usually, ti is recommended, that different pages of the same website share the same styling and overall structure. So, it is not uncommon for a designer/developer to copy code from the index.html file onto their sub or secondary pages.Got to About Page