Aside disappears when I give it an ID

0 Lois Lewis · September 12, 2015
Hello, I am following Bucky's tutorials on HTML 5, in particular the first 13, which show you how to lay out a generic website. One of the tags he covers is an aside, which worked for me at first, but then disappeared from my website when I tried to add an ID to it. I am using NetBeans, and I also noticed that, even without the ID, Netflix gives me a warning on that line and tells me to "remove surrounding tag." I have no idea why either of these are happening, because although a little of my content is different, I basically just follow the tutorials.

Here is my code (I unlinked the CSS sheet to make sure that wasn't the problem):

<!DOCTYPE html>

<html lang="en">
        <meta charset="utf-8"/>
        <!--<link rel="stylesheet" type="text/css" href="main.css" />--> <!--reference main CSS file-->
        <link rel="icon" type="image/x-icon" href="./favicon.ico"> <!--change icon of tab-->
        <div id="big_wrapper"> <!--wrap everything so that we can center it later-->
            <!--top left logo thing-->
            <header id="top_header">

            <!--navigation tabs at the top of website-->
            <nav  id="navigation_tabs">
                    <li>Tab 1</li>
                    <li>Tab 2</li>
                    <li>Tab 3</li>

            <!--main content-->
            <section  id="main_section">
                            <h1>Article Title</h1>

                    <!--<p name="test">Paragraph 1</p>-->

                        <p>by Lewis Lewis </p>

            <!--side ads-->
            <aside> <!--this is the line that it gives me the "remove surrounding tag" warning, and if I add an ID, the aside disappears from my website -->
                <h4>Buy Magiclex!</h4>

            <footer id="footer">

Anyone know what's going on?

Post a Reply


Oldest  Newest  Rating
+1 Craig Charlton · September 13, 2015
from the point of view of your question there is nothing wrong with your html. As I couldn't see the problem I copied  it to my editor and there is no problem when I open it up. There is no problem if I add an id to the aside either... when I open the webpage everything is as it should be.... the aside is there.....

Your problem is not in this code..... maybe your system needs a clean out... if you have removed the css then it cant be much else..... I note that you have commented out the css link but did you refresh the (or open a new) page once you had commented it out????

Again.... the problem is not with your html....
+1 Ian Arbuckle · September 13, 2015
Netbeans is awful for web applications and I recommend Jetbrains which is pretty awesome for this stuff.
0 Lois Lewis · September 13, 2015
Okay, thanks. I did reload it after commenting out the CSS, and I also just noticed that that project doesn't tell me that NetBeans chrome connector is running when I run it, unlike my other projects, so there is probably something wrong with NetBeans for me.

Anyway, it's good to know that there's nothing wrong with my code. Thanks!
  • 1

HTML / CSS / Web Design


Discuss, share, ask, learn and teach HTML5 and CSS3.