HTML Flashcards
how to add style with CSS
“Style Tags”
h1 {
color: blue;
}
CSS Selector
the HTML element that you want the style to be applied to (the h1 in the example below)
h1 {
color: blue;
}
CSS Property
color in the example below:
h1 {
color: blue;
}
HTML Headline element
<h1></h1>
what every webpage needs to start with this
document type
(This is an example of telling the browser to interpret this doc as an html document)
should always be at the top and there shouldn’t ever have a space before it
HTML tags
this is what placed right after the doctype and serves as the “root”
what is contained in the head tags?
meta information invisible to the users and CSS
character set
what is an HTML attribute and attribute format
information provided to the browser, invisible to the user
word=””
html entity for copyright symbol
©
header
The header element helps to structure the content. This is different from the head element, which is just for document metadata.
section
Sections break up logical groupings of information, just like sections of a newspaper.
footer
The footer element is a complement to the header element. It represents the bottom of a content area.
<h2></h2>
The second level headline element, similar to first level headlines. Typically these appear slightly smaller by default.
<p></p>
The paragraph element should contain text in sentence or paragraph form.
<a></a>
The anchor element allows for two HTML pages to be linked together.
<a href="index.html"> <h1>Brent Colson</h1> <h2>Tennis Player</h2> </a> <ul> <li><a href="index.html">Portfolio</a></li> <li><a href="about.html">About</a></li> <li><a href="contact.html">Contact</a></li> </ul>
Notice the two locations the anchor tag is used
The navigation element is a semantic element that wraps any type of site navigation. It doesnt add anything to the page - it really just organizes the structure
<ul></ul>
The unordered list element contains list item elements and is typically styled with bullet points by default.
<li>
</li>
The list item element makes it possible to format text in a list form. Each list item element should go inside of an ordered or unordered list element.
Relative Path
Describes the location of a file using a partial file path that’s based on the location of the original file relative to the file that’s being referenced.
Absolute Path
Describes the location of a file using the full file path.
<img></img>
The image element is a self closing element with two required attributes. The source (src) attribute points to the image file and the alternate (alt) attribute describes the image using text (for a screen reader for example). An example when an image is a list item:
<ul>
<li><img></img></li>
</ul>
The link element connects other files to an HTML document, such as CSS or JavaScript files. It is self closing tag.
note: the rel (relationship) is the type of file you are linking to
CSS
Cascading Style Sheets, the computer code that defines the visual presentation of web pages.