WHICH IS TO SAY …
<b></b> – bold text<big></big>, <small></small> – to change text size<blink></blink> – primarily used to ensure that people despise you.<center></center> – for centering text<font></font> – for font size and face<i></i> – italic text<sub></sub>, <sup></sup> – subscript, superscript.<u></u> – underlined text<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Some books I've read</title>
</head>
<body>
<p>Of all the books I've read in graduate school, the <em>least</em> worthwhile was <cite>Infinite Jest</cite>.</p>
<p>On the other hand, I quite enjoyed <cite>House of Leaves</cite>.</p>
</body>
</html>
<!DOCTYPE> declaration is (to you) a string of gibberish whose purpose is to tell the browser what flavor of HTML you’re using.xmlns= attribute on the <html> tag tells XML parsers how to parse the HTML.<h1> looksh1 {font-family: Arial;
font-size: 36pt;
text-align: center;}
<h1> tag.h1 {font-family: Arial; font-size: 36pt; text-align: center;}<tag id="something">
<tag class="something something_else">
<tag style="some valid styling information">
p,td,li {font-family: "Times New Roman";
font-size: 12pt;
margin-bottom: 0;}
p.first-paragraph {margin-top: 0;}
p#abstract {font-style: italic;}
#abstract {font-style: italic;}
.abstract {font-style: italic;}
<p class="abstract">This paper pointlessly compares several characters in later Dickens novels.</p>
<p>This paper compares the eponymous characters in <span class="abstract">Martin Chuzzlewit</span> and <span class="abstract">David Copperfield</span>.</p>
don’t use a top margin on any list item that is inside an<ol>tag that is inside another<li>tag.
don’t underline any<a>tag that is inside a list item that is part of an unordered list that is inside a list item that is inside a block with the IDnav.
don’t display a bullet or number for any list item that is the immediate child of the element with the IDnav(but don’t apply this rule if the<li>element is a more remote descendant of thenavelement than being its immediate child).
<span></span> – marks an inline group of text for some purpose of your own.
<p>I thought that <span class="book-title">1Q84</span> was a very disappointing novel.</p><div></div> – marks a block-level group of text for some purposes of your own.
<div class="document-header"><p>I was very disappointed by<span class="book-title">1Q84</span>.</p><p>However, I quite enjoyed <span class="book-title">Infinite Jest</span>.</p> </div>
<li style="font-style: italic;">First item</li><html>
<head>
<style>
h1 {font-size: 24pt; font-family: Arial;}
</style>
<title>Some Thoughts</title>
</head>
<body> ...
<html>
<head>
<link rel="stylesheet" type="text/css" href="/content.css" />
<title>Some Thoughts</title>
</head>body {background: white;}
body {background: rgb(255,255,255);}
body {background: #ffffff;}<body> tag (i.e., the whole page).rgb() specifier.p.info-box {background: url("paper.png") repeat;}<p> tag with the class attribute set to “info-box” to whatever image is contained in the file paper.png, and tiles it so that it fills the whole box that the <p> block occupies.p {font-family: "Times New Roman", Times, serif;
font-size: 12pt;
text-indent: 0.5in;
width: 6.5in;
text-align: left;
margin: 1in;
line-height: 200%;}| property | Useful settings |
font-size |
12pt; 120%; 3em |
font-family |
"Arial Black", Arial, sans-serif |
font-style |
normal; italic; oblique; inherit |
font-weight |
normal; bold; 400; bolder; lighter |
text-align |
left; right; center; justify |
color |
black; #000000; rgb(0,0,0) |
text-decoration |
none; overline; blink; underline; line-through |
white-space |
normal; pre; nowrap |
text-indent |
0.5in; 2ex; 20px; 4pt; 2.5cm; 3pc |
p {font-family: "Times New Roman", Times, serif;}
serif, sans-serif, monospace, cursive.Say you have an HTML file containing two paragraphs:
<body>
<p>Whatever normcore selvage Schlitz, locavore PBR&B viral. Butcher pork belly slow-carb, 8-bit kitsch PBR food truck ethical kale chips fap. Etsy lo-fi swag mixtape pop-up. Williamsburg keytar meggings, cred scenester Neutra Intelligentsia meh pork belly blog Pinterest tote bag. Lo-fi High Life pop-up, freegan small batch lomo hashtag 90's jean shorts XOXO. Letterpress fixie DIY cred, fap umami ethical McSweeney's small batch cardigan Banksy viral Blue Bottle Intelligentsia disrupt. Deep v ethical literally salvia brunch banjo fanny pack.</p>
<p>Flexitarian authentic Marfa Shoreditch salvia, freegan vegan twee Intelligentsia wayfarers. Pour-over 3 wolf moon ugh synth. Neutra beard mustache, ennui lomo mlkshk Schlitz Intelligentsia. Yr ethical Carles, fap direct trade selvage whatever skateboard Tumblr you probably haven't heard of them mumblecore Schlitz. Salvia hashtag gastropub American Apparel. Roof party art party tousled jean shorts, pickled farm-to-table yr sriracha pop-up cardigan pork belly. Street art Banksy Marfa freegan hoodie direct trade lo-fi, hella gentrify kitsch Shoreditch umami retro Pinterest chambray.</p>
</body>
p {background: aqua;
padding: 0.5in;
border: 2px purple dashed;
margin: 1in;}
| Property | Useful settings |
|---|---|
clear |
left; right; both |
display |
inline; block; list-item; table; none |
width |
800px; 80%; 6.5in; 60em |
vertical-align |
top; baseline; middle; bottom; sub; super |
position |
static; relative; absolute; fixed |
top; right; bottom; left |
12px; .25in; 3em; 20%(use with relative, absolute, or fixed positioning) |
float |
left; right; none |
p {font: italic small-caps bold 12pt/24pt "Times New Roman", Times, serif;}
p {font: bold 12pt "Times New Roman";}margin is a shorthand property for margin-left, margin-right, margin-top, and margin-bottom.background is a shorthand property for background-color, background-image, background-repeat, background-attachment, and background-position.