Internal Cascading Style Sheets

Cascading Style Sheets also known as CSS, can make your job easier as a web designer. Using some simple HTML CSS coding can bring life to an html created list. I'll tell you more about the details of CSS programming language, in my up coming CSS tutorials. For now, we're going to add a little style to our list using the Internal CSS technique.

Adding Style to My List

How I add CSS Style to a single page on my website is easy. If I want the web page to look different from the rest of my website, I use an Internal CSS programming coding. Follow the example below, it'll show you one way it can be done.

Example 1

<!DOCTYPE html>

<html>

<head>

<title>HTML List Example</title>

<style>

ul {

list-style-type: none;

margin: 0;

padding: 0;

width: 100px;

background-color: #f1f1f1;

</style>

</head>

I added the CSS code in the head section of the document. The text is bode, so you can see the new coding I added.


Example 2

<body>

<h1>Learning A New Language</h1>

<ol>

<li>Foreign

<ul>

<li><a href="#English">English</a></li>

<li><a href="#Spanish">Spanish</a></li>

<li><a href="#French">French</a></li>

<li><a href="#Mandarin">Mandarin</a></li>

<li><a href="#Hindi">Hindi</a></li>

<li><a href="#Arabic">Arabic</a></li>

</ul>

</li>

<li>Programming

<ol>

<li><a href="#HTML">HTML</a></li>

<li><a href="#CSS">CSS</a></li>

<li><a href="#Javascript">Javascript</a></li>

<li><a href="#SQL">SQL</a></li>

<li><a href="#PHP">PHP</a></li>

<li><a href="#C++">C++</a></li>

</ol>

</li>

</ol>

</body>

</html>

I added an html code to each item on list. The code goes in the head section of the document. The text is bode, so you can see the new coding I added.

Example 3

BEFORE

    • English
    • Spanish
    • French
    • Mandarin
    • Hindi
    • Arabic
  1. Programming
    1. HTML
    2. CSS
    3. Javascript
    4. SQL
    5. PHP
    6. C++

Example 4

AFTER


That's how you customize a nested list using html coding. It's a list that we converted into an navigation bar.

Let's move on to the next lesson, that's if you don't have any questions.


If you have any questions about creating nested list using html, please use the dussicion group or send me an PM here at Wealthy Affiliate.

UP NEXT: - HTML Code: HTML and Notepad



Join the Discussion
Write something…
Recent messages
storm57 Premium
Thanks, I am actually in the process of learning this in another course. So to go over it again in this training is great.
Gail
Reply
seconds2work Premium
I'm glad it can help. I'm always looking for information about programming and studying. Thank you Gail,
Reply
startouched Premium
Good stuff!
Thanks for sharing this information!
Kathy
Reply
seconds2work Premium
You're welcome, Kathy, and thank you
Reply
JMupanguri Premium
Thanks for sharing.
Reply
seconds2work Premium
thank you for reading it.
Reply
reanna1 Premium
Thank you, LeNard!
Reply
seconds2work Premium
thank you
Reply
MKearns Premium
Learning HTML is a good predecessor to learning WordPress!
Reply
seconds2work Premium
?
Reply
MKearns Premium
Much of WP is built on HTML coding
Reply
seconds2work Premium
Yep, they go hand in hand
Reply
Top