Make a Website - Codecademy Flashcards
h1 … h6
heading element
p
paragraph
a
The a element is used to create links.
img
The img element is used to add images to a page.
ul li
a bulleted list
- Home
- About
body
The body element contains the actual content of the web page - everything nested inside and shows up in the web browser
!DOCTYPE
The doctype at the start of the HTML file tells the browser which version of HTML you are using. The doctype is not an HTML element, so it doesn’t have a closing tag. The doctype ensures that your web page displays consistently when its visited from different browsers.
div
A div element groups other elements together into sections of the web page, such as a navigation bar, the main body, and the footer.
The outer
..
groups the elements into the navigation bar section of the web page. The inner .. wraps the contents in a container.
HTML
HTML is used to write a web page’s content
CSS
CSS is used to define the design and layout of the page.
CSS rules
- A CSS rule starts with a selector. A selector specifies which HTML elements to style. Here the h1 CSS selector selects all h1 HTML elements on the page.
- Inside the braces { }, a property and its valuedefine what aspect of the h1 elements to style. Setting the color property to red changes the color of the h1 element to red.
Class Selector
The class can be targeted from CSS by using a dot (.).
background-color
The background-color property sets the color for the background of an HTML element.
background-image
background-image property sets an image as the background of an HTML element.
Ex.) background-image: url(http://goo.gl/04j7Nn);
}
border
The border property sets the width, style, and color of an element’s border