Starting off CSS

CSS Information and support
Post Reply
User avatar
ProjectX
Site Admin
Posts: 95
Joined: Thu Mar 14, 2024 10:56 pm
Location: UK, England
Contact:

Starting off CSS

head element within the html element

Add a head element within the html element, so you can add a title element. The title element's text should be Cafe Menu.
<head><title>Cafe Menu</title></head>
BUILDING UP A PORTFOLIO FOR A BRIGHTER FUTURE!
Freelance Web development | Web Maintenance | Graphics Designer | Social Management
User avatar
ProjectX
Site Admin
Posts: 95
Joined: Thu Mar 14, 2024 10:56 pm
Location: UK, England
Contact:

Re: Starting off CSS

Nesting a meta element with an attribute

The title is one of several elements that provide extra information not visible on the web page, but it is useful for search engines or how the page gets displayed.

Inside the head element, nest a meta element with an attribute named charset set to the value utf-8 to tell the browser how to encode characters for the page. Note that meta elements are self-closing.
<head>
<title>Cafe Menu</title>
<meta Charset="utf-8">
</head>
BUILDING UP A PORTFOLIO FOR A BRIGHTER FUTURE!
Freelance Web development | Web Maintenance | Graphics Designer | Social Management
User avatar
ProjectX
Site Admin
Posts: 95
Joined: Thu Mar 14, 2024 10:56 pm
Location: UK, England
Contact:

Re: Starting off CSS

Add a body element below the head element.

To prepare to create some actual content, add a body element below the head element.
<head>
<meta charset="utf-8"/>
<title>Cafe Menu</title>
</head>
<body></body>
BUILDING UP A PORTFOLIO FOR A BRIGHTER FUTURE!
Freelance Web development | Web Maintenance | Graphics Designer | Social Management
User avatar
ProjectX
Site Admin
Posts: 95
Joined: Thu Mar 14, 2024 10:56 pm
Location: UK, England
Contact:

Re: Starting off CSS

Main element within the existing body element

It's time to add some menu content. Add a main element within the existing body element. It will eventually contain pricing information about coffee and desserts offered by the cafe.
<body>
<main></main>
</body>
BUILDING UP A PORTFOLIO FOR A BRIGHTER FUTURE!
Freelance Web development | Web Maintenance | Graphics Designer | Social Management
User avatar
ProjectX
Site Admin
Posts: 95
Joined: Thu Mar 14, 2024 10:56 pm
Location: UK, England
Contact:

Re: Starting off CSS

Adding a main header - Add an h1 element within your main element.

The name of the cafe is CAMPER CAFE. Add an h1 element within your main element. Give it the name of the cafe in capitalized letters to make it stand out.
<main>
<h1>CAMPER CAFE</h1>
</main>
Adding a Sub-header under the main header

To let visitors know the cafe was founded in 2020, add a p element below the h1 element with the text Est. 2020.
<h1>CAMPER CAFE</h1>
<p>Est. 2020</p>
BUILDING UP A PORTFOLIO FOR A BRIGHTER FUTURE!
Freelance Web development | Web Maintenance | Graphics Designer | Social Management
User avatar
ProjectX
Site Admin
Posts: 95
Joined: Thu Mar 14, 2024 10:56 pm
Location: UK, England
Contact:

Re: Starting off CSS

Adding a Menu to your webpage.

Adding two sections to a menu

There will be two sections on the menu, one for coffees and one for desserts. Add a section element within the main element so you have a place to put all the coffees available.
<main>
<h1>CAMPER CAFE</h1>
<p>Est. 2020</p>
<section></section>
</main>
Adding style and content to the menu

Up until now, you have been limited regarding the presentation and appearance of the content you create. To start taking control, add a style element within the head element.
<head>
<meta charset="utf-8" />
<title>Cafe Menu</title>
<style></style>
</head>
<body>
<main>
<h1>CAMPER CAFE</h1>
<p>Est. 2020</p>
<section>
<h2>Coffee</h2>
</section>
</main>
</body>
BUILDING UP A PORTFOLIO FOR A BRIGHTER FUTURE!
Freelance Web development | Web Maintenance | Graphics Designer | Social Management
Post Reply