JSFiddle - React, Tailwind, and code Playground
by Alma Grace
HTML
<link rel="alternate" hreflang="es-ar" href="http://allrecipes.com.ar/" />
<link rel="alternate" hreflang="es-cl" href="http://allrecipes.com.ar/" />
<link rel="alternate" hreflang="es-pe" href="http://allrecipes.com.ar/" />
<link rel="alternate" hreflang="es-uy" href="http://allrecipes.com.ar/" />
<link rel="alternate" hreflang="es-us" href="http://allrecipes.com.mx/" />
<link rel="alternate" hreflang="es-es" href="http://allrecipes.com.mx/" />
<link rel="alternate" hreflang="es-mx" href="http://allrecipes.com.mx/" />
<link rel="alternate" hreflang="pt" href="http://allrecipes.com.br/" />
<title>Allrecipes - Recipes and cooking confidence for home cooks everywhere</title>
<link href="http://css01.media-allrecipes.com/css2009/v-2014.0326/Core.css" rel="Stylesheet" type="text/css" media="all" />
<script type="text/javascript" src="http://js01.media-allrecipes.com/js/bundles/v-2014.0326/main-site.compressed.min.js"></script>
<link href="http://css01.media-allrecipes.com/js/bundles/v-2014.0326/main-site-css.compressed.min.css" rel="Stylesheet" type="text/css" media="all" />
<script type="text/javascript" language="JavaScript">
adid = "";
aradsord = Math.random() * 10000000000000000;
if (typeof AR == "undefined") {
AR = {
AdData: {}
};
};
</script>
<link href="http://css01.media-allrecipes.com/js/bundles/v-2014.0326/home-page.compressed.min.css" rel="Stylesheet" type="text/css" media="all" />
<script type="text/javascript">
AR.AdDfpTags.RegisterSlot({
"SlotId": "div-gpt-ad-leaderboard",
"Site": null,
"Zone": null,
"Keywords": null,
"SponsoredKeywords": null,
"Origin": null,
"Position": 0,
"HasOutOfPageSupport": false,
"InterstitialOnly": false,
"CssClass": null,
"DisableInitialLoad": false,
"Targets": null,
"Sizes": []
});
AR.AdDfpTags.RegisterSlot({
"SlotId": "div-gpt-ad-top-right",
"Site":...
CSS
body {
text-align: center;
background-color:#F7F7F7;
background-repeat: repeat-y;
background-position: center top;
background-attachment:fixed;
margin: 0;
padding: 0;
background-image:url(http://images.media-allrecipes.com/global/nav/topnav2/backgrounds/global-wallpaper-1016-2013.png);
}
#wrap {
width: 1000px;
margin: 0 auto;
text-align: left;
}
#main {
float: left;
width: 675px;
}
#farright {
float: right;
width: 310px;
}
#left {
float: left;
width: 170px;
}
#center {
float: right;
width: 505px;
}
#copyright {
width: 1000px;
margin: 0 auto;
padding: 6px 0px 55px;
color: #666666;
font-family: Verdana, San-Serif;
font-size: 9px;
background-color:#fff;
clear:left;
}
.right {
float: right;
}
.left {
float: left;
}
.clearfix:after {
content:".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
.clearfix {
display:inline-block;
}
/* Hide from IE Mac */
.clearfix {
display:block;
}
/* End hide from IE Mac */
.navlist {
list-style-type: none;
padding: 0 0 1px 0;
}
ul.navlist li {
display: inline;
}
/* end layout styles */
.truncate-inline {
text-overflow:ellipsis;
-o-text-overflow:ellipsis;
-moz-binding:url(http://allrecipes.com/xbl/ellipsis.xml#ellipsis);
white-space:nowrap;
overflow:hidden;
display:inline-block;
max-width:100%;
}
.truncate-block {
text-overflow:ellipsis;
-o-text-overflow:ellipsis;
-moz-binding:url(http://allrecipes.com/xbl/ellipsis.xml#ellipsis);
white-space:nowrap;
overflow:hidden;
display:block;
max-width:100%;
}
.ellipsis2 {
-moz-binding: url('/xbl/ellipsis.xml#ellipsis');
}
#content {
background-image: none;
}
#main {
float: left;
width: 675px;
}
#center {
float: right;
width: 675px;
}
#topcenter {
padding-left: 20px;
}
JavaScript
//pearl
/*
var wrapper = document.getElementById("wrapper");
alert ( wrapper.querySelector("h1").textContent);
var goodFoot = document.querySelector("#container");
alert (goodFoot.querySelector("p").textContent);
*/
displays all the text content without the tag. OK
var text1 = document.body.textContent;
alert (text1);
displays all the text content AND the tags. OK
var text2 = document.body.innerHTML;
alert (text2);
/*
var allParagraphs = document.getElementsByTagName('p');
for (var i=0; i < allParagraphs.length; i++ ) {
alert( allParagraphs[i].textContent);
}
var allTitles = document.getElementsByTagName('a');
for (var j=0; j < allTitles.length; j++ ) {
alert( allTitles[j].textContent);}
var imgrecipe1 = document.querySelector("#imgRecipe");
alert(imgrecipe1.innerHTML);
var imgrecipe = document.getElementById("imgRecipe");
//alert ( imgrecipe.querySelector("imgRecipe").textContent);
alert(imgrecipe.innerHTML);
*/