• There are two main types of plants in the world: annuals, which you plant from seed (or cutting or slips or whatever) each year, and perennials, which come back every year.

    Some examples of annuals are cucumbers, lettuce, potatoes, peppers, and zucchini. Each year, you need to plant new plants. Each year, they complete their life cycle entirely in the span of one season. You get seeds (or slips or cuttings or whatever) from them to plant again next year.

    Some examples of common perennials are asparagus, rhubarb, many kitchen herbs (sage, thyme, and chives in particular), horseradish, and strangely enough, tomatoes. With all but the tomatoes, you plant them once and then harvest each year after they’re established. Tomatoes are technically perennials, in that they can be kept from year to year if you’re in a warm enough climate. Up here in the north where I am, we treat them as annuals, but if you have a hot house or you live in a warm area, you can keep them alive and producing without having to replant each year.

    Annuals are important. They’re here for a brief season, they grow, and we harvest them. The majority of vegetables we eat are annuals. You can pick up pre-sprouted annuals like cucumbers and peppers at your local feed store each spring. For those of us with a yen for gardening, going to Agway is a dangerous thing right now. Somehow, these plants always end up in my dang trunk… You can also pick up seeds, both for indoor seeding and for planting right outside in your garden beds.

    Perennials, though, are even more important (in my opinion, of course). With perennials, you plant once, harvest for years. As I get older, I look for more and more perennials so that I have less work to do in the garden each summer! An asparagus bed will keep giving for 20 to 40 years, with nothing more than an occasional fertilizing and weeding. Rhubarb, too, doesn’t require a lot. You do have to “split” it up into bits every five to eight years, to keep it healthy and growing, but that’s not too arduous. Some of my herbs have been in my garden for more than a decade, and are coming along very well. I recently had to get medieval on my oregano, because it was escaping its enclosure and getting into the lawn. While that smells nice during mowing time, it’s a waste.

    (more…)

  • SCOTUS is Busy

    Yost v. Brown et al. was just granted a stay.

    The plaintiffs (not bad guys) are attempting to get an initiative on the ballet. Before this happens, the AG of Ohio reviews the summaries of the initiative to verify that it is an accurate summation. The AG’s opinion differed from the plaintiffs so they took it to court.

    The district court (bad guys) issued a preliminary injunction to force the AG (not bad guy) to “immediately certify” the plaintiffs’ desired summary language.

    This is another case of the courts overstepping their Article III limits.

    They have been clearing out 100s of cases requesting cert in the 2024-2025 term.

    The slapped down the DC District Court for calling preliminary injunctions a TRO to avoid review. And they also slapped down the DC Circuit Court for allowing the District Court to do so.

    The did the same for the Massachusetts District Court, which “issued what it styled as a temporary restraining order (TRO)”. This included a Gibb’s slap to the First Circuit court.

    They have not granted Cert for Snope or Ocean State Tactical, nor have they denied it. They keep conferencing the cases. I’m not sure what they are waiting for.

    They sent Antonyuk back to the District Court to finish their work.

    I think everybody has learned that fighting for a win on an interlocutory state just isn’t worth it. The Circuit Courts over these rogue District Courts are just a rogue and just as bent. The Supreme Court isn’t going to deal with an interlocutory Second Amendment case until they have a new Second Amendment opinion out.

    Simply put, the rogue inferior courts will just twist the Court’s words to get the outcome they want.

    Market Fluctuation

    What goes up must come down? Or maybe it is the other way around, what goes down must go up. I absolutely understand the panic day traders and market players must be having. People panic, people sell, the price of shares goes down.

    If you are worried about your unrealized gains or losses, you aren’t in the markets for the long run. There are very few investment securities that will lose money in the long run.

    You might not make as much, but it is unlikely that you will lose money. Just ride the trough out. Many people did just that for the four years of Biden, riding out a couple of months under Trump should be a no-brainer.

    Hypocrisy lives

    Elizabeth Warren is trying to get a bill passed to ban congress critters from investing in individual stocks. Of course, this doesn’t touch the astonishing wealth she’s accumulated since taking office.

    As Allyson says, “Read the Bill.” I don’t believe anything a Democrat says about a bill. I need to read the darn thing myself.

    It is straightforward to write a bill that sounds like it stops insider trading but leaves gaping holes for congress critters to make money from inside knowledge.

    One of Chuck Schumer or Adam Schiff got out there and said that Trump was guilty of insider trading. His proof? Trump said that it was a good time to buy while the market is in this panic sell off.

    Yet, Adam and Chuck seem to make way more money than a government employee should.

    Trump and the Second Amendment

    There are things that are happening in the administration that seem to be good. I’m concerned because nothing is set in stone. I’ll start cheering once I hear the Solicitor General get before the Circuit and Supreme Court and back The People.

    Question of the Week

    Do you think Trump is getting what is best for our country with his tariffs?

  • We won, again.

    These inferior rogue courts lose and the media plays it up as a win.

    The short of it, the state (not bad guys) transferred Kilmar Armando Abrego Garcia to the El Salvador “super max”. Garcia was under a court order to be kept in the United States.

    Garcia is a bad person. The state says he is a member of MS-18, he claims he is not. He does not appear to have a criminal record outside of being here illegally. He was detained under the Biden Puppet administration.

    His transfer was a mistake. The state acknowledges this.

    The District Judge issued another of those magic TROs. He overstepped his Article III power when he ordered the Government to facilitate and effectuate the return of [Garcia] to the United States by no later than 11:59PM on Monday, April 7.

    To understand this win, it is necessary to understand the power of a court. When a court gives an order, it must be followed or the court can find you in contempt. Being in contempt can cause people to be arrested.

    In this particular case, I believe it is Kristi Noem who would have been held in contempt.

    The TRO uses two different terms with different legal meanings. The first is to “facilitate”. This is telling the Government to work with El Salvador to get Garcia back. It could be the Government paying money, it could be other diplomatic pressure, or it could be a simple “please give him back.”

    The difficulty the Government has is that Garcia is a member of MS-13. Under El Salvador law, this means he is a terrorist. As a terrorist in El Salvador, he will be detained in their super max under their laws.

    Under the facilitate requirement, as long as the Government was working to get Garcia returned to the United States, they were within the boundaries of the TRO.

    The second term, “effectuate” is different. This is a get-it-done requirement. This requires that Garcia be back in the United States before midnight on the 7th. If the Government does not have Garcia back in the United States by that deadline, they will be in contempt.

    Whatever the full reasons might be for the state not wanting Garcia back, it is unreasonable to expect the state to negotiate the return of Garcia and to have him back in the states within the deadline given by the court.

    Chief Justice Roberts quashed this TRO without committing the Court. He issued an administrative stay. Because that stay took the case past the midnight deadline, there was no more threat of contempt.

    Having made it past the deadline, the Court then issued an order today.

    The application is granted in part and denied in part, subject to the direction of this order. Due to the administrative stay issued by THE CHIEF JUSTICE, the deadline imposed by the District Court has now passed. To that extent, the Government’s emergency application is effectively granted in part and the deadline in the challenged order is no longer effective. The rest of the District Court’s order remains in effect but requires clarification on remand. The order properly requires the Government to “facilitate” Abrego Garcia’s release from custody in El Salvador and to ensure that his case is handled as it would have been had he not been improperly sent to El Salvador. The intended scope of the term “effectuate” in the District Court’s order is, however, unclear, and may exceed the District Court’s authority. The District Court should clarify its directive, with due regard for the deference owed to the Executive Branch in the conduct of foreign affairs. For its part, the Government should be prepared to share what it can concerning the steps it has taken and the prospect of further steps. The order heretofore entered by THE CHIEF JUSTICE is vacated.
    — 604 U.S. ___ (2025) 24A949 Justice Sotomayor

    Yep, the district court was just slapped down for overreaching its power.

    The government is no longer required to return Garcia, they are required to work towards getting him back. Meanwhile, they can continue the court case at the district level, which might end with Garcia staying in El Salvador.

    The government is only required to share, what it can, about the steps they are taking to facilitate the return of Garcia.

    “We’ve scheduled a meeting with the representative of El Salvador.” Which is 4 weeks from now. They can slow walk this thing.

  • Just a short follow up. In one day the portfolio I am following recovered about 530%.

    That is to say, the reported loss over the last 6 days has gone from 3.58% yesterday to 0.19% today.

    Just stay the course and things will get better.

    If you are invested in the market, don’t panic. As CBMTTek pointed out, February 2024 the S&P 500 was doing just fine, at the same level. The media wasn’t screaming about the economy tanking.

    What is curious is the lack of panic in 2021/22 when the supply chain was in shambles. Ports were not moving products, ships were idling offshore, trains were not getting loaded at ports, etc… and the Secretary of Transportation was at home on maternity leave. Why no panic then?
    — CBMTTek

    He’s correct. The amount of panic the media projects is tempered by which party is in control.

    A 0.001% drop in the market when Trump does something is cause to panic, which causes the sheep to sell, causing the market to drop. A 1.000% drop in the market when a Dem is in office creates a cricket like ambiance. And saying anything makes you a conspiracy theorist.

  • I had a Right leaning friend post this meme yesterday:

    What I responded with is very honest: “I don’t think so, or not without full due diligence. Remember, what the Right does to the Left or puts into practice can later be used by the Left against the Right. Put NOTHING in place that could even remotely possibly go wrong when turned around. This is something that could *easily* be turned around.

    There will always be people on both sides of the aisle who feel they are doing what they are doing to support the Constitution. The problem with the person who posted this originally is that he knows darn well HE is defending and adhering to the Constitution… and assumes that those on the Left are not, and/or will not.

    I can think of quite a few legitimate reasons why someone in the House or Senate might choose to support an illegal alien over a US citizen. For instance, no matter how illegal someone is, if a US citizen assaults, sexually or otherwise abuses, murders, etc. someone from another country (legal or illegal), that’s wrong. I’ll support the person who was the victim.

    Putting up something this broad is not “making it perfectly clear” or stating it’s in black and white (in any way other than the fact that it’s black and white lettering). This is akin to the Dems wanting to get rid of the filibuster while the Republicans are in office and then trying to get it back in when they’re in office. If the proposed rule can’t be broadly applied, or applies only “sometimes” (ie when your opponent is in office), then it’s not a good rule.

    This is not a good suggestion.

    Words, as I’m constantly told, have meaning. I might be pretty sure I know what’s being implied in this meme, it’s NOT clear. If we were to put something like this into practice, it would immediately be turned around and used against the Conservatives. And rightly so, quite frankly.

    There’s a lot going on around us right now. According to the Left, the stock market is crashing like never before. I’ve heard the term “huge” used more than Trump uses it, which is driving me batty.  

    As you can see in this image (Morningstar, Inc.), the mess during Biden’s time as President was quite impactful, especially as seen after the moderately beautiful recovery started by Trump 1.0. Now, this image doesn’t include the stock market information of the past few days, but frankly, I think you can all go look yourself. Yes, there was a dip. No, it would not even register on a graph of this size. It’s barely visible on a graph that includes only 2016 onward, quite frankly. Yes, there was a dip, and that’s natural. It’s a great time to buy stock, quite honestly. With the Left influencing what people think, there are bound to be some run offs with certain types of stock. We know that nothing huge is going to happen with Trump at the helm, so we may as well invest. Just be sure to pull out before the next President gets in, unless it turns out to be Vance, in which case, stick with it.

    I really don’t get the absolute panic over the tariffs. I can’t tell you how many times I’ve been told I “just don’t understand” how tariffs work (hint: I do), and how Trump’s tariffs are going to tank our whole economy (hint: they didn’t, and aren’t). People I love and care for are absolutely devastated over the whole tariff business, and it’s sad, because it’s not something to be upset about.

    But… again, when tariffs get applied, our prices are likely to go up slightly. It behooves us to be ready for that. Once it all turns around, we’ll still be sitting pretty. No need for panic, folks.

    _
    “What We’ve Learned From 150 Years of Stock Market Crashes.” Morningstar, Inc., 1 Apr. 2025, https://www.morningstar.com/economy/what-weve-learned-150-years-stock-market-crashes.
  • Trump has put multiple tariffs into place. These tariffs cause changes in supply chains and in the costs to produce certain goods.

    Every product produced requires raw goods, tooling, work space, and skills to create.

    Consider a simple BLT. The raw goods are bacon, bacon, bacon, lettuce, tomato, bread, mayo. Having all of those raw goods does not a BLT make.

    You have to have the correct tooling. The tooling here is a way of cooking the bacon, such as a grill top, cutting tomatoes, cutting bread, spreading the mayo.

    Once the sandwich is produced, it has to be packaged for delivery. That requires still more raw goods.

    When you sell that sandwich, you include the cost of the raw materials that go into it, you include the cost of the packaging, you include the cost of the tools, the building you used, and you include the cost of labor. You then need to include the cost the government imposes on you.

    The cost of your raw goods includes the price you pay for the goods, the cost the government imposes on those goods, such as tariffs and VAT, and the cost of transporting the raw goods to your location.

    Once you have all those costs, you add profit to come up with the price you will charge your customers.

    Now, let’s change the product, instead of creating a sandwich, you are creating a gear. Your raw goods are iron and pattern making materials. You will use your tools to convert pattern making materials into patterns. You will then use those patterns to cast gear blanks. You will then turn those gear blanks into finished gears by applying different tools.

    You have converted raw materials, with knowledge, skill and labor, into a finished product, a gear.

    That gear is sold at a price which is profitable to you. That gear is likely a raw material for some other business.

    Tariffs add to the cost of anything imported into a country that imposes imports. Imports are decided on the origin country or the country of manufacture.

    Consider a car that is manufactured in Detroit. If that car includes raw materials that are imported from other countries, those materials that have tariffs applied will cost more.

    There are no “complexities” to this. The “PANIC!” people want you to think there are, that’s not true. Every business keeps track of the cost of raw materials. If they don’t know the costs, they can’t set prices. It doesn’t matter if Ford, Canada produces the part or Ford, Flynt creates the part. There is a cost that is paid to have that part in the Ford, Detroit plant to put into a new car.

    In a well-functioning business, they are always looking at the cost of raw materials. The cost of raw materials includes the cost of taxes (tariffs) and transportation.

    It also includes the cost of bad materials. If you are paying a $1.00 for a widget and there is a 10% failure rate, that means you are paying $1.10 for each working part. If somebody else has the same widget with a cost (price + extra costs) of $1.05 and a failure rate of 0.1% that means they are only scrapping 1 in 1000 widgets.

    In this case, it is actually cheaper to buy the “more expensive” widget.

    Included in the cost calculations are longer-term issues. If the ball bearings you purchase are not properly heat treated, and you assemble them into a high-precision roller bearing which then fails in a million dollar engine, there is a heck of a lot more costs involved.

    We know that people will change their purchasing habits when the cost of needed goods goes up. We saw this when Americans switched from steak to ground beef as their primary meat. Look at the CPI for food, you’ll see that in the past it had steak on it, today it has ground beef.

    Because the cost of goods goes up, people will look for better prices. If that search leads to a local business, so much the better.

    Unfortunately, local business might not be set up to cope with a large influx of new business. This leads to shortages.

    In a market-driven economy, this leads to people consumers offering more or producers charging more. This is called a “signal”.

    Because this signal exists, asking for more of that product, producers will attempt to create more product. This could be as simple as turning on an extra machine or as complex as standing up an entirely new production plant.

    When this is going on, “the market” will respond. The market responds by buying or selling ownership in different companies. If a company that used to clear $2,000,000 per year is now projected to clear $4,000,000 per year is likely to attract buyers. A company that is seeing their income drop is likely to attract sellers.

    This causes market fluctuations.

    Over the course of yesterday, the portfolio that I follow was up as much as 1% yet closed down 0.82% Since Trump announced the tariffs, the portfolio has lost 3.53%

    On $100,000 that’s a $3,530 loss.

    And it is meaningless. That portfolio will go up again.

    The people who are screaming the loudest are the people with millions in the stock market. If that are looking at a $10,000,000 portfolio, a 3.53% drop is $353,000 “loss”. That is more than a 1/4 million dollars in just a few days.

    But it only becomes a loss if they sell now. If they hold on to those securities and the price recovers or goes up, then they will “make money”. But again, that is only true if they actually sell the security to realize the profits they made.

    There is no reason to panic. The sky is not falling. If anything, this might be a good time to look at putting money into the market. The trick is to buy when near the bottom of the sell-off.

    The only reason I know this, is I did some research this last week. I am NOT the person you want to take financial advise from.

  • “Drink a toast to my best friend, Samuel Colt!”

    One of the things I’ve noticed in listening to the vast array of older music lately, is that most of it wouldn’t make it on today’s radio. This song, for instance, would be considered horribly violent even though it wouldn’t even be a footnote in an action movie. I’ve listened to a song about truckers showing up at a kid’s house to take him out for a ride while his mom was at work (Teddy Bear), another about a bunch of Boy Scouts sneaking up on Girl Scouts bathing nude (The Battle of Kookamonga), yet another about a guy who gets blown up running illegal liquor (White Lightning)… The one that made me giggle the most was Lil’ Red Riding Hood by Sam the Sham and the Pharaohs, which talks about how Red is “everything a big bad wolf could want.”

    I love this music. Some of it is from my childhood. Some of it is from earlier. They all tell stories that would cause pearl clutching today. Perhaps that’s why I find them so amusing.

  • This case has had a long and torturous journey. We are not at the end of its travels.

    Yesterday, the Supreme Court denied cert in this case. There was no statement issued in relation to this case.

    Just “cert is denied”

    That might sound like a horrible loss, it is not.

    This case has not reached a final judgment at the district court yet.

    On December 13, 2022, Judge Glenn Suddaby issued his decision and order. The state (bad guys) had filed a motion to reconsider the court’s preliminary injunction granted November 17, 2022.

    The state then appealed to the Second Circuit court. The Second Circuit court stayed the injunction pending the outcome of the appeal. They issued their opinion against The People, finding that it was ok for the state of New York to ban the carrying of firearms almost everywhere.

    The plaintiffs (good guys) appealed to the Supreme Court. The Supreme Court granted certiorari, vacated the Second Circuit Court’s ruling in light of Rahimi.

    The Second Circuit heard oral arguments again. After a suitable delay, they said that they got it right the first time, even when considering Rahimi. The plaintiffs (still the good guys), filed a petition for writ of certiorari.

    Friday, the Supreme Court justices held their Friday conference. Yesterday, they issued their order and simply denied cert.

    This means that the Second Circuits stay of the case stays in place. The case is remanded back to the district court to finish the “fact finding” and then to await final judgment.

    In other words, this case is still in an interlocutory state.

    In my humble opinion, the Supreme Court declined to hear this case because it was in an interlocutory state and if they were to GVR the case, they knew the Second Circuit will get it wrong again. The Second Circuit is a rogue inferior court.

    We still have Snope and Ocean State Tactical seeking cert.

    I don’t see either conferenced yet, but that should be forthcoming soon.

  • I discovered this recipe by watching an older Turkish couple in Azerbaijan on YouTube. They don’t share amounts, but the woman cooks on screen, and I made educated guesses about how much of everything to put in. She uses this recipe both to make these flat breads, and as a crust for meat pies. I’ve done both. This is my take on her recipe.

    Ingredients:

    • 2 cups all purpose flour, sifted
    • 1/4 cup water, luke warm
    • 3 tbsp melted butter
    • 1/2 cup plain yogurt
    • 1 tsp active dry yeast
    • 3 tsp sugar
    • 1 tsp salt
    • 1 tbsp olive oil
    • egg wash
    • sesame seeds

    Garnish:

    • 1/4 cup olive oil extra virgin
    • 1 tbsp garlic paste
    • 1/3 cup Italian parsley, finely chopped

    Whisk sugar, yeast and water in a medium-large size mixing bowl. Let it sit for 15 till the mixture froths and bubbles.

    Add flour, butter, yogurt, and salt. Knead together using a wooden spoon or the bread hook of a stand mixer. When the dough starts to come together, drizzle in the olive oil, and continue kneading until the dough is combined with the oil and has come away from the sides. This will be a shaggy dough, rather than a soft and smooth one.

    Pick up the dough and gently form into a ball shape. Rub some olive oil on the inside walls of the mixing bowl. Gently place the dough back into the the mixing bowl (do not knead anymore) and cover it with plastic wrap and towel or a lid. Place the the bowl in a warm place to rest for an hour or until it doubles in size.

    Flour your working surface, and place the dough onto it. Divide it into several evenly sized pieces (two pieces for pie “crust” or four to six pieces for flatbreads), and make them into balls. Be very gentle, as you want all the little air pockets to stay inside the dough. Sprinkle each ball with dry flour lightly, and then cover them with plastic wrap or a moist, warm towel to keep the dough moist. Let them rest for 10 minutes before moving on to the next step.

    For pie crust, take each ball and gently pat it down with your hands to flatten it. If you need, you can use a rolling pin to even it out into a circle. Add your filling in the center, and then lift up the sides and begin to pinch the edge together to make a side for your “pie.” This will be open topped, with a pretty crimp along the edge, sort of like the top of a fancy Asian dumpling. Don’t worry if it doesn’t look good. It will taste divine. Skip to the baking part below.

    For flatbreads, pat each ball down with your hands to flatten it. You can use a rolling pin to make it even and either circular or oval, your choice. Leave the rest of the dough under the plastic towel while you work on each flatbread, so that the dough doesn’t dry out.

    Preheat a cast iron pan or griddle on your stovetop, at medium heat. Place the flattened dough onto the heated pan for about 10 seconds, then flip it over. Cook the other side for about 20 seconds, then flip back to the original side for another 5 seconds. Flip one last time for 5 more seconds, and then set it aside.

    Repeat the above pan frying for each of your dough balls. Let the bread cool for about 10 minutes, and then check to see if it’s properly cooked inside. If it isn’t, you can put it back onto the stove for a few more seconds.

    Mix together the garnish ingredients above, and brush them over the still-warm flatbreads, and serve as soon as you can.

    If you’re baking pies, preheat your oven to 375°F. While it’s preheating, glaze your pie dough with an egg wash (whisk an egg with a little water or olive oil and brush it gently over the exposed dough) or melted butter or warmed olive oil. Sprinkle with sesame seeds, if you like. Bake for 30 to 45 minutes, checking frequently after the 25 minute mark.

    Notes:
    When I use this as a pie crust, I use a finely minced meat, and all the other ingredients are also finely minced. This ensures the filling will cook properly by the time the crust is baked.

    You don’t have to make big pie crusts. Most people like to have a pie to split, but if you want to make individual ones, flatten them out to a little larger than hand size, and then follow the recipe. This is a great recipe to play with!

  • A modern website is a complex system of inter related pieces. Each of which must work correctly and communicate correctly with the other parts of the system.

    As website creators, we break the design into the Frontend and the Backend. The front end is anything the end user sees, while the back end is responsible for generating content to be displayed.

    The backend is further subdivided into the Model, Controller, and View. The model is our term for the database and database access. The controller is the rules for the website. The view is the creation of content to be displayed.

    Consider a website that allows you to purchase an item. The “model” would describe that item. SKU, size, weight, cost, price, images, description, name, and much more. The “controller” encodes the business rules. We can only ship to people that have paid us. And the view turns all the information into content for a browser to display.

    The content is delivered as HTML. We can also supply JavaScript code and Cascading Style Sheets. The HTML can have the JavaScript and CSS embedded in the HTML or the HTML can link to other resources to be included with this page.

    HyperText Markup Language

    The US government wanted a standardized way of creating electronic documents for printing. This was the Standard Generalized Markup Language, ISO8879.

    SGML has the advantage of being very application-specific. If you are writing a book, you use one set of tags, if you are creating the Message Of The Day, you use a different set of tags.

    The power of markup is that you describe what you are marking up, rather than formatting whatever it might be.

    Consider and address. Bilbo Baggins, 999 Bagshot Row, Hobbiton, The Shire. As written in this sentence, it is just a row of text. You could write it that way on a letter and it would be delivered, but the postman would be unhappy at the formatting

    <b>Bilbo Baggins</b><br/>
    999 Bagshot row<br/>
    Hobbiton, The Shire<br/>

    Is the address formatted, which looks like

    Bilbo Baggins
    999 Bagshot row
    Hobbiton, The Shire

    Using DocBook, a particular version of SGML, we would write that same address something like:

    <address><surname>Baggins</surname><givenname>Bilbo</givenname>
    <street>99 Bagshot row</street>
    <city>Hobbiton</city><state>The Shire</state>
    </address>

    We do not know how to display the address, but we know that it is an address. If we are provided rules on how to display addresses, we can display this address per the rules.

    Structure

    HTML was designed to be simpler than SGML. There are fewer tags, and the fixed meaning of the tags made it easy to write HTML by hand.

    Almost every post I create is written in raw HTML. That HTML is then styled and displayed in nearly pretty ways.

    HTML defined the structure of the document. The structure was of a header section, describing the page, and a body section with the actual content.

    Within the content section were the different displayable content. You had headers, levels 1 through 5, you had numbered lists, unnumbed lists, and definition lists (a word with an attached definition). There were paragraphs, links, tables, and finally, there were images.

    This content was rendered however the browser wanted to.

    There were formatting tags for bold, italics, blinking, and not much more.

    If you wanted to “layout” your webpage, you used tables and fought to get things right.

    Cascading Style Sheets

    CSS allowed us to provide styling to an element. The paragraph above has margins, padding, and boarders applied to it. It has colors applied for the background and for the font. All are set via a style sheet. Your browser has a default style for each element.

    The problem that arises is how to attach that styling to particular elements. The answer starts with the structure of the document.

    p {
      color: red;
      background-color: green;
      margin-left: 50px;
      border: 2px;
    }
    

    This uses a CSS selector, ‘p’ to locate all paragraph elements. It then sets the background to green, the font to red, moves it to the right 50px, then draws a 2px solid border around the paragraph.

    This is a basic selector. Selectors get very complex.

    DOM

    Every element in an HTML document is loaded into the DOM. From there, we can select elements and modify the style of the element with CSS and CSS Selectors.

    The simplest method is to give important elements an ID. IDs are unique for a DOM. If there is more than one element with the same ID, this will generate an error, which most people will never see. The rules tell us which element will own that identifier.

    To find a particular element with a particular ID you use the ‘#’ symbol. Thus, to find the header just above, we would write “#DOM”. While the header would look like <h3 id=”DOM”>DOM</h3>.

    We can add a multiuse identifier, called a class, to multiple elements at the same time. <div class=”quote”> is the code I use to create a quote. The class “quote” has a CSS group attached. This causes all the divs of class quote to be rendered as a block quote.

    We then have the tag selector. We used one above with the “p” element. This allows us to select all the elements of a particular type. The selector “li” would select all the list items in the DOM. We could use this to make every line italic.

    We can combine selectors to limit which elements are selected. “ul>li” would select all line items of unordered(without numbers) list, while “ol>li” would select all line items which were part of an ordered (with numbers) list.

    These selectors can even allow us to move through the DOM in a structured way. We can ask for the first paragraph after a header for special treatment.

    DOM Manipulation

    When we load JavaScript on a web page, that JavaScript can watch for events on elements. This is done by locating an element with a selector, then watching for a particular event to take place on that element.

    The JavaScript can then modify the DOM. This can be by changing the structure of the DOM, or it can be modifying the style of elements in the DOM.

    A recent example of this, I added a class to some table data items (td). I did it with a class. I then found all the elements with that class and watched for a mouse click on those elements.

    When the click was detected, my JavaScript ran. The JavaScript grabbed the contents of the element, stripped out formatting, then put that content into a text input box, displayed the text input box for the user to edit.

    When the user completed their edit, the value they entered was formatted, the input was removed from the DOM. The formatted value was then placed back in the element.

    All with a bit of good selection to make it work.

    Finally, Selenium uses different types of selectors to find elements for manipulation or testing.

    Very powerful stuff.