<head><metacharset="utf-8"/><!--This element simply specifies the document's character encoding --><!-- Adding an author and description --><metaname="developer"content="Damon Brooks"/><metaname="description"content="This info here can be helpful for search engines (SEO)"/><!-- facebook small icon meta info og:title, og:description and goes on... --><metaproperty="og:image"content="https://en.wikipedia.org/wiki/Batman#/media/File:Batman_Detective_Comics_Vol_2_1.png"/><metaname="description"content="This is for google searches"/><metaproperty="og:title"content="html learning center"/><!-- small icon on browser --><linkrel="icon"sizes="114x114"href="multi/spidey.png"/><!-- fav icon --><linkrel="shortcut icon"href="favicon.ico"type="multi/spidey.png"/><!-- for the css file --><linkrel="stylesheet"href="mystyle.css"/><title>HTML-head</title></head>
Basic content
Headings
<!-- Main to less important --><h1>Heading</h1><h6>heading6</h6>
Paragraphs
<p>
Paragraph one.<br/>
Other line.
</p><p>Paragraph two.</p><hr/><p>line above.</p>
<olid="orderedList"><li><i>italic</i></li><li><b>bold</b></li><li><u>underlined</u></li><li>
This is a hyperlink to
<!-- in href= "html2.html" same dir
href="dir/html.html" diff dir
href="../gobackanddiff/html.html"
--><!--opens up in a new tab target="_blank" --><ahref="https://www.mozilla.org/en-US/"target="_blank"title="The best place to find more information about Mozilla's
mission and how to contribute">the Mozilla homepage</a>.
</li><li><ahref="https://download.mozilla.org/?product=firefox-39.0-SSL&os=win&lang=en-US"download="firefox-39-installer.exe">
Download Firefox 39 for Windows
</a></li><li><ahref="mailto:nowhere@mozilla.org">Send email to nowhere</a></li><li><ahref="mailto:nowhere@mozilla.org?cc=name2@rapidtables.com&bcc=name3@rapidtables.com&subject=The%20subject%20of%20the%20email &body=The%20body%20of%20the%20email">
Send mail with cc, bcc, subject and body
</a></li></ol>
Description list
<!-- Description Lists terms and definitions --><dl><dt>description title</dt><dd>description term</dd><dt>blockquote</dt><dd><blockquotecite="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/blockquote"><p>
The
<strong>HTML <code><blockquote></code> Element</strong> (or
<em>HTML Block Quotation Element</em>) indicates that the enclosed text
is an extended quotation.
</p></blockquote></dd><dt>inline quote</dt><dd>
inline quote— <code><q></code><qcite="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/q">
This text is inside quotation marks</q></dd></dl>
Extra formatting
<cite>(cite)title of the work </cite><br/><bdodir="rtl">Right to left text</bdo><p>
Abbreviations <abbrtitle="Hypertext Markup Language">HTML</abbr> for example
</p><address><p>Address, Manchester by the sea, USA</p></address><p><mark>Superscript:(marked)</mark> 25<sup>th</sup> of May 2011.</p><p>Subscript: C<sub>8</sub>H<sub>10</sub>N<sub>4</sub>O<sub>2</sub>.</p>
Multimedia
Images
<imgsrc="multi/spidey.png"alt="spiderman image"title="Spidey"height="300px"width="300px"usemap="#dotMap"/><!-- link from only a part of image --><mapname="dotMap"><!-- coords = vertical, horizontal,radius--><areashape="circle"coords="150,150,50"alt="circle"href="https://www.yahoo.com"/></map>
<videosrc="multi/spidey.mp4"controls><p>
Your browser doesn't support HTML5 video. Here is a
<ahref="img/spidey.mp4">link to the video</a> instead.
</p></video><!-- Video autoplay muted --><videocontrolswidth="200px"autoplayloopmuted><sourcesrc="multi/spidey.mp4"type="video/mp4"/><trackkind="subtitles"src="multi/subtitle.vtt"srclang="en"/></video><embedtype="video/mp4"src="https://interactive-examples.mdn.mozilla.net/media/examples/flower.mp4"width="250"height="200"/>
<formaction="where the data should be send"method="GET or POST"><br/><!--name--><div><!-- label is the value of id --><labelfor="name">Name: </label><br/><!-- text input --><!-- min-max values are set --><inputtype="text"id="name"name="user_name"requiredminlength="3"maxlength="15"/></div><!--Email--><div><labelfor="mail">E-mail:</label><br/><!-- required!! --><inputtype="email"id="mail"name="user_mail"required/></div><!--Password--><div><labelfor="password">Password</label><br/><!-- Matching a pattern --><inputtype="password"id="password"name="user_password"value="psw"pattern="[a-zA-Z0-9]+"/></div><!--submit button--><div><br/><!-- type submit creates a submit button --><!-- When a <form> is submitted, the name of the fields that accept input and the value of those fields are sent as name=value pairs. --><buttontype="submit">Submit</button></div><br/><!--number input--><div><labelfor="amount">Number input</label><inputid="amount"name="amount"type="number"step="1"requiredmin="1"max="10"/></div><br/><!-- range input--><div><labelfor="numRange">Range!!</label><br/><span>Less</span><inputid="numRange"name="numRange"type="range"min="0"max="5"step="0.5"/><span>More</span></div><br/><!--checkbox input --><div><labelfor="checkbox1">checkbox1</label><inputtype="checkbox"id="checkbox1"name="checkboxed"/><labelfor="checkbox2">checkbox2</label><inputtype="checkbox"id="checkbox2"name="checkboxed"/></div><br/><!--textarea --><div><labelfor="msg">Message:</label><textareaid="msg"name="user_message"></textarea></div><br/><!--radio input--><div><labelfor="good-player"><inputtype="radio"id="good-player"name="good-bad-player"checked/>
Good Player
</label><labelfor="bad-player"><inputtype="radio"id="bad-player"name="good-bad-player"/> Bad Player
</label></div></form><hr/><!-- dropdown list--><p>Pick a day</p><selectname="days"><optionvalue="monday">Monday</option><optionvalue="tuesday">Tuesday</option><optionvalue="wednesday">Wednesday</option><optionvalue="thursday">Thursday</option><optionvalue="friday">Friday</option></select><!--datalist input--><p>pick a browser(datalist)</p><formaction="/action_page.php"><inputlist="browsers"/><datalistid="browsers"><optionvalue="Internet Explorer"></option><optionvalue="Firefox"></option><optionvalue="Chrome"></option><optionvalue="Opera"></option><optionvalue="Safari"></option></datalist></form>
a forum post, a newspaper article, or a blog entry.
section
represents a standalone section
aside
frequently presented as sidebars or call-out boxes.
footer
info about author, copyright, links
Additions
CSS
Selectors
/*every single element on page */*{box-sizing: border-box;font-size: 24px;}/*id selector*/#newId{background-color: #7fe7cc;height: 40px;padding-top: 10px;}/*class selector*/.newClass{background-color: #dfe38e;height: 80px;}/*descendant selector*/header h2{padding: 2px;}/*type selector*/p{font-family: fantasy;}/* :visited :link */#link-4:link{color: #f17e7e;}#link-4:visited{color: #efca8c;}/*adjacent selector (only the element that is immediately preceded by the former element)*/.navi + p{font-size: 34px;}/*direct child*/.navi > ul{border: 1px solid black;/* doesnt add another border to ul inside ul*/}/*sibling combinator*/.navi ~ p{color: violet;/*this selects all siblings not just the first one like + */}/*attributes selector*/[data-vegetable]{text-transform: uppercase;}/* not selector*/.item-list:not([data-vegetable]){text-transform: lowercase;}/*nth child*/.items li:nth-child(3) a{color: red !important;}/*nth last child*/.items > li:nth-last-child(1) a{color: green;}/*starts with*/a[href^="http"]{background-color: #f17e7e;}/*contains*/a[href*="developers"]{background-color: #3a9679;}/*ends with*/a[href$="png"]{background-color: #f2c0ff;}/*custom attributes*/li[data-vegetable="liquid"]{background-color: #f2c090;}/*first letter and nth of type*/header p:nth-of-type(2)::first-letter{font-size: 40px;color: #3a9679;}
Box Model
/* The vertical margins will collapse to 30 pixels
instead of adding to 50 pixels. */.block-one{margin: 20px;}.block-two{margin: 30px;}/* horizontally center element */div{margin: auto;}/* add scroll if element is larger than container */.scroll{overflow: scroll;}/* max-width, min-width */.column{max-width: 100px;width: 200px;}/* hides element without removing them */.invisible-elements{visibility: hidden;}/* hides element removing them */.col{display: none;}/* content-box does not include padding and margin */.col{box-sizing: border-box;}
Display and Positioning
/* element2 will overlap element1 */.element1{z-index: 1;}.element2{z-index: 1000;}/* position can be static, relative,absolute, fixed */nav{position: fixed;}/* takes the full width */.container1{display: block;}/* take as little space as possible */.container2{display: inline;}/* can appear next to each other */.container3{display: inline-block;}/* The content will float to the left side of the
container. */.left{float: left;}/* The content will float to the right side of the
container. */.right{float: right;}/*This determines that no other elements within the same
containing element are allowed to float on the left side
of this element.*/.element{clear: left;}/*This determines that no other elements within the same
containing element are allowed to float on the right side
of this element.*/.element{clear: right;}/*This determines that no elements within the same
containing element are allowed to float on either side of
this element.*/.element{clear: both;}/*This determines that other elements within the same
containing element are allowed to float on both side of
this element.*/.element{clear: none;}
/* Sets the text as bolder. */p{font-weight: 700;}.text{font-style: italic;}/* external fonts */@font-face{font-family:"Glegoo";src:url("../fonts/Glegoo-Regular.ttf")format("truetype");}/* Here `Arial` is the fallback font for <p> tags */p{font-family:"Helvetica","Arial";}p{line-height: 10px;}/* colorful text */.colorful-headline{display: inline-block;background-image:linear-gradient(to right, green, red);background-clip: text;color: transparent;}
Responsive Design
/* unit em */.nav-container{font-size: 10px;}.nav-container span{font-size: 1.5em;/* 10 x 1.5 = 15px */}/* percentage */.news-row{height: 300px;width: 500px;}.news-row .news-column{height: 80%;/* 240px */width: 50%;/* 250px */}/* view-height and view-width */.news-row{height: 100vh;width: 50vw;}/* ruleset for >= 600px media type screen, print, handheld */@mediaonly screen and(min-width: 600px){}/* CSS ruleset */@mediaonly screen and(max-width: 480px)and(minresolution: 300dpi){}/* ruleset for 480px - 600px */@mediaonly screen and(min-width: 480px)and(max-width: 600px){}