HTML Basics Flashcards
HTML
-Hypertext Markup Language
-Used to build webpages
+provides structure
- Hypertext: content linked to related content
- Tags surround and “mark up” text, forming an element
HTML
-Hypertext Markup Language
-Used to build webpages
+provides structure
- Hypertext: content linked to related content
- Tags surround and “mark up” text, forming an element
<p></p>
- paragraph tag
- formats interior text
<p></p>
paragraph tag
content
-have opening tags and closing tags
someone elements like images are self closing and do not need a separate closing tag.
DOCTYPE TAG
DOCTYPE TAG
HTML document
-will be comprised of tags which are characters surrounded by angle brackets
<p></p>
paragraph tag
content
-have opening tags and closing tags
<span></span>
- inline element
- groups interior content
- occupies width of interior content (no more than width of screen)
- used to place content side by side
Attributes
HTML tags can also have metadata inside them referred to as attributes. An attribute is defined by a key, and equals sign, and a value that is usually between double quotes.F
DOCTYPE TAG
HTML structure
.
<p> A parag</p>
Syntax rules
-tags are not case-sensitive
-use lowercase when you declare tags
-attribute values are case-sensitive
ex: <img></img>
is different from <img></img>
- HTML only allows single spaces
- elements should have closing tags or be self-closing
- elements should be properly nested
- browsers will ignore unknown tags
Webpages are
comprised of Keywords: elements + attributes
<div></div>
- A block style element
- groups interior content
- occupies entire window screen width
<span></span>
- inline element
- groups interior content
- occupies width of interior content
- used to place content side by side
Layout elements
Anchor Tag attribute : href=”” (hypertext reference)
it is an attribute that specifies the location of the resource being referred or that the link directs to
Anchor Tag attribute : target=”” (target window)
-determines which context the link opens to
-it can have one of four values
+ “self” : opens the link in the same context (window)
+ “_blank” : opens the link in a new context
+ “opens the link in a parent context”
+“top” : opens in the topmost parent context
Semantic elements
- examples are <div> and <span> elements</span>
- do not visually affect webpages
- used to organize related content </span></div>
Semantic elements cont.
- : header content
- : navigation content
- : a reserved section of a page
- : article or story content
- : sidebar content
- : footer content
webpages may attach special styling or functionality to semantic tags
- : ordered list
creates an itemized list (1,2,3)
-
- : unordered list
creates a bulleted list (bullet points)
-
- : list item denotes an item in any kind of list