it took me days to figure out this simple code and gave up and decided to look it up and apparently the h1 element was just h1 without the opening and closing tag, and on previous problems i have struggled, i think there has to be a better indication of how to actually do the code and be more specific, at least in my journey of trying to learn as a beginner
not really, u don’t need d brackets.
in my example i said you only needed d elementname no brackets or anythings. If ur element is p, you’ll style it like this:
p{
font-size: 30px;
}
without affecting your earlier code. Simply call the element (not with your mouth of course) but by declaring it on your code like what i did above and it will respond.
Ok I understand now, but why didn’t the problem tell me I didn’t need the brackets to put the element cause all I have learned was elements go with opening and closing brackets.
you are writing a css rule for h1 element above. within the css rule, element did not need the element text CAMPER CAFE, nor the angular brackets and slash <h1></h1>. only need the element name.
the angular bracket and slash are used only for HTML code.
Hey there,
first of all you need to understand, you are learning TWO languages at the same time.
One is HTML (HyperText Markup Language), which is used to define the structure and content of your page, like defining different headlines and paragraphs etc. Your code example is an HTML document.
The other language is CSS (Cascading Style Sheets) and responsible for enhancing your structured content with layout, like positioning, colors, borders, fonts and so on.
Your HTML document is the point to start creating a webpage. In the document’s header you give instructions how to process the content. Here you may define which styles to use for layout, either by linking to a CSS file or - as in your case - inline by writing it directly between opening and closing style-Tags.
So the style-Tag itself is HTML, everything wrapped in it is CSS.
HTML says, I am defining a lvl 1 headline by wrapping it in HTML tags <h1></h1>.
CSS now says, oooh, I know there might be lvl 1 headline elements marked by the keyword h1.
So CSS takes the keyword for an HTML element and defines how to style it (wrapped in curly brackets).
ohhhh ok all these explanations helped a lot, this is the guidance i needed, thank you all for the responses i needed since im just a beginner and i really love coding and want to learn and become good