onediewreckshun

html guide | http://kimsjongin.tumblr.com

Apr 20th, 2013
596
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.32 KB | None | 0 0
  1. HTML GUIDE | by http://kimsjongin.tumblr.com | still a work in progress lol
  2.  
  3. so first of all:
  4. tumblr has a good explanation for making themes here: http://www.tumblr.com/docs/en/custom_themes
  5. if you want to test this stuff as i go along use this base code: http://socriminals.tumblr.com/post/39283639852
  6.  
  7. TAGS
  8.  
  9. at the beginning of a theme, we have the <!DOCTYPE html> tag which begins the html. at the end of all the html, there's a </html>, which signifies the end of the whole code. doctype means document type.
  10.  
  11. then right after that, there's usually the <head> tag, and after that is all the meta tags. you know what those are. i'll explain them more after this. the head tag usually ends after the </style> tag.
  12.  
  13. then at the beginning of the css stuff, we have <style type="text/css">. at the end of that, there's </style>. [As you can see, the slash after the carat (that's what the arrows are called) signifies that the tag is ending a section. ]
  14.  
  15. at the beginning of the actual content of your blog, you have the <body> tag and the end of the content is signified by </body>.
  16.  
  17. CSS
  18.  
  19. k so css means "cascading style sheet" and basically you use css to style stuff
  20. in css we usually use hex colors (we use rgb colors too but that's really tough to learn so i won't go into that).
  21. hex colors are a # with six numbers/letters after it. if it's a common color like white or black, you can just put the actual name of the color rather than the hex value.
  22. if the hex color is just one letter/number repeated, you can shorthand it to only three characters. white is #ffffff, but you can say #fff for short.
  23. if you want the easy way out, go to colorpicker.com and pick hex colors whenever you need one.
  24. ***it would be good to have some hex colors memorized for future reference, though. i've memorized white (#fff), black (#000), gray (these go from lightest to darkest): #eee #ddd #bbb #999 #9a9a9a #aaa #888 #777 #666
  25.  
  26.  
  27. here's an example. i've put all the simple styling stuff into it.
  28.  
  29. #blah {
  30. /*it could also be .blah; btw putting this symbol of an asterisk and a slash allows you to put notes in your code without affecting the code*/
  31.  
  32. /*stuff for styling text*/
  33.  
  34. color:#000; /*this is the color obv*/
  35.  
  36. background: #fff /*white*/ url('IMAGEURL') /*this is if you wanted a background image*/;
  37.  
  38. border: 1px solid #ddd; /*the 1px thing is border width. solid is the border style, which could be dotted, dashed, or double. #ddd is the color. #ddd itself is gray, but go to colorpicker.com and choose a color from there if you want to replace it.*/
  39.  
  40. /*padding is the space around something. before i teach you how to edit the padding, you should know that if you want to keep it all on one line, you could replace padding-top padding-right padding-bottom and padding-left with padding: 1px 1px 1px 1px; and the order would go top, right, bottom, left.*/
  41.  
  42. padding-top: 1px;
  43.  
  44. padding-right: 1px;
  45.  
  46. padding-bottom: 1px;
  47.  
  48. padding-left: 1px;
  49.  
  50. /*margin is the position of something. before i teach you how to edit the margin, you should know that, just like in padding, if you want to keep it all on one line, you could replace margin-top margin right margin-bottom and margin-left with margin: 1px 1px 1px 1px; and the order would go top, right, bottom, left.*/
  51.  
  52. margin-top: 1px;
  53.  
  54. margin-right: 1px;
  55.  
  56. margin-bottom: 1px;
  57.  
  58. margin-left: 1px;
Add Comment
Please, Sign In to add comment