Layout of HTML consists of 6 parts they are
header:- Defines a header for a document or a section
nav:-Defines a set of navigation links and buttons that can redirects to another page or opens a new set of lists
section:- Defines a section in a document ,may consists of introduction ,gist ,or a piece of information about the content
article:-Defines independent, self-contained content,the entire article considered as the body of contents of the document
aside:-Defines content aside from the content (like a sidebar),advertisement area etc
footer:-Defines a footer for a document or a section,like copyrights ,patent ,trademarks,collaborate partners list,references to other sites etc
CSS Selectors:-CSS selectors are used to "find" (or select) the HTML elements you want to style
some of the selectors are:-
id selector:-The id of an element is unique within a page, so the id selector is used to select one unique element,To select an element with a specific id, write a hash (#) character, followed by the id of the element
Class selector:- The class selector selects HTML elements with a specific class attribute,to select elements with a specific class, write a period (.) character, followed by the class name
Element selector:- used pick html elements by the name of the particular element
Universal selector:-The universal selector (*) selects all HTML elements on the page.
Group selector:- used to group two or more html elements in one area for applying same styling or attributes were used
Example
h1, h2, p {
text-align: center;
color: red;
}
Pseudo class:-pseudo-classes are always denoted by a single colon (:) followed by the pseudo-class name,it is a keyword that can be added to a selector, to define a style for a special state of an element
Pseudo element:-pseudo-element is a keyword that can be added to a selector, to style a specific part of an element,pseudo-elements are denoted by a double colon (::) followed by the pseudo-element name

Top comments (0)