HTML Basics

HARD REFRESH TO ACTUALLY SEE CHANGES CUZ CACHE

<parent>
   <child1>
     <child2>
     </child2>
   </child1>
</parent>

<tagname att1="value1" att2 ="value2"> </tagname>
<img src="mountain.jpg" alt="A mountain" />
<a href="www.math.ucla.edu/~virtanen">My page</a>
<a href="#someId">My page</a>

All tags just have default CSS styling and expectations for usage, could only use divs and then style them

  • p should only contain paragraphs of text and will warn if div inside

  • div divides common and basic

    span is default inline for word level styling

  • span is inline so margin wont work

  • div and p are block

Element Type

  • Block start a new line by default and stack up like blocks

  • Inline elements occur in the flow of text

Special Characters

\  => non-breaking space \< => less-than <

\> => greater-than > \© copyright symbol © \® => reg symbol ®

Last updated