HTML!


contents:



basics:


structure:

back to contents

the line of code for a css should be integrate into the header element, an example is

<link href="/style.css" rel="stylesheet" type="text/css" media="all">

<title> </title> put the title for the web page (seen in the browser tabs) here.

only content within the body tags will appear on the live webpage.

the body tags are

<body> and </body>.

selectors:

back to contents

a "class" attribute is one way to select an element in css. class selectors have a period (.) at the front. eg. a class selector for the class "brand" must be written as .brand . multiple classes can be used at once. in html, a .brand and .bold class together would be written as "brand bold" in the class tag.

an id selector can only be used once per page, and is prefaced in css with a #. eg. #brand.

a attribute selector can be used for html elemets that already have attributes. the selector is encased in brackets like [this] in the css code. eg. [href] would target all href elements.

pseudo-classes are written like :this, with an an element in front of it, like a:this for links or p:this for paragraphs. pseudo-classes allow different elements to respond differently depending on user interaction, such as through hovering (eg. a:hover).

a class is meant to be used many times, an id is meant to style only one element per page. id styles override types and classes.