Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Getting-started beginner question – embedding CSS into HTML file

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #296416
    wb0gaz
    Participant

    I am having problem embedding CSS into my (single) HTML file. I am using notepad as an editor, and the example I’m working on is extremely simple. The problem is that all of the beginner-level examples I’ve found so far show CSS fragments and HTML fragments, but I’ve not yet found a single HTML file (example, index.html) that has both CSS and HTML information (in the correct order.)

    The initial example I’m working on should just show five boxes stacked vertically with a single word in each box. First below is the output; second below is the single HTML file I am using.

    How should I arrange the HTML and CSS sections within a single file to get it to “work”? Is there something obvious missing or wrong?

    Thank you very much for your help!

    CURRENT OUTPUT ON BROWSER:

    Expected output is a set of five boxes stacked vertically with the words “One” .. “Five” inside the box
    One
    Two
    Three
    Four
    Five
    .wrapper { display: grid; }

    CURRENT HTML FILE:

    (sorry I do not see how to include HTML in the posting, so hopefully you can follow what I have here or let me know how to embed HTML in the posting)

    html preamble
    html head section
    html body section begin

    (div class = “wrapper”)
    (div) One (/div)
    (div) Two (/div)
    (div) Three (/div)
    (div) Four (/div)
    (div) Five (/div)
    (/div)

    .wrapper (brace)
    display: grid;
    (brace)

    html body section end

Viewing 1 post (of 1 total)
  • The forum ‘CSS’ is closed to new topics and replies.