What's new

Code Question

Data Glasses

Top Contributor
I am having a little fun today trying to learn some html and to my surprise most of it is working ….kinda cool. But after the part where i do a heading two piece of text "This is a heading two word in italic" the text stays in H2, even if i add <p> and </p> to the ordered list below? I have tried a few variations but have not been able to crack it as yet and thought i may ask here instead. I have 'bolded' the problem area and would love to get some advice. It's not the end of the world but would be handy to know, many thanks !!

<html>


<head>

<title> This Is Fun To Try </title>



</head>


<body>

<h1 align="center"> Von Roddy </h1>

<p> This is a
<strong> strong word </strong>
</p>

<p> This is not a strong word.
<i> It is italic </i>
</p>

<h2><i> This is a heading two word in italic </i></p>

<ol>
<li> line one </l1>
<li> Line two </l2>
</ol>



<ul><p>
<li> line one </li>
<li> line two </p></li>


<table border="1">
<tr><td> first square but with wider text</td><td> second square </td>
<tr><td> third square </td><td> forth square </td>
</table>



</body>

</html>
 

Data Glasses

Top Contributor
Just tried that, no change other than the table below moving a little, many thanks

<ul><p>
<li> line one </li>
<li> line two </p></li>
</ul>
 

petermeadit

Top Contributor
having fun with HTML... :)

It might also help to be careful how you nest your tags. Some code might work, but will give errors and cause problems on different browsers.

Here you have a mixed the tags nesting.

<ul><p>
<li> line one </li>
<li> line two </p></li>
</ul>

Would be better like this

<p>
<ul>
<li> line one </li>
<li> line two </li>
</ul>
</p>

Anyways have fun.
 

findtim

Top Contributor
its GREAT to learn these basics and so everyone creating a website should.

if you build a website using wordpress all these small issues are " a button "

you can then still go and look at the code and go " ohhhh, i get it "

thats how i learnt and still learning, i am ALWAYS using spare domains to experiment before implementing.

TODAY, i had a problem in wordpress, stuffed me up for an hour and " it was a button setting " s^^T happens.

my BIGGEST hint would be if you are going do more ( and this is a hint for all who didn't know how to fix the issue ) IS, record this info and everything else you do because if you don't you will have to say to yourself " F.... tim told me to record it "

because in 6 months time you will go " hmmmm, i had that problem and solved WTF did i do to fix it " ? :D


tim
 

eBranding.com.au

Top Contributor
my BIGGEST hint would be if you are going do more ( and this is a hint for all who didn't know how to fix the issue ) IS, record this info and everything else you do because if you don't you will have to say to yourself " F.... tim told me to record it "

because in 6 months time you will go " hmmmm, i had that problem and solved WTF did i do to fix it " ? :D

This is very good advice.

I have a simple system that I use to record changes and fixes that are made to my sites. Often a problem is solved or a cool new feature is developed that I can then roll out across a number of my sites.

Also very handy if you're upgrading the platform, theme etc and you need to rework some custom code to play nice with the new version - always a lot easier when you have the exact details of what changes were made, where and why they were made.
 

findtim

Top Contributor
"commenting out " ( search google ) is another good thing to do when making changes ESPECIALLY in your CSS

tim
 

Data Glasses

Top Contributor
Well this is just a first try at html via a youtube video (bookmarked for reference) so i am not going to be too hard on myself. Two things that have stuck from this thread is to 'close off' a line of code and also i thought pete's comment about the 'nest of code' was interesting. Yes of course your advice is also handy tim, don't worry i wont curse you. One way to remember the mistake is to colour code the mistake. 'Remember to close off' is what really has stuck. Hey it's friday so all is good !
~
I thought it was interesting that video made reference to lower case and capitols being a problem with some browsers, is lower case coding better as a rule of thumb?
~
Thanks
 

findtim

Top Contributor
indenting makes it easy to see where things start and stop eg: tables

you will also learn a lot from using firefox with FIREBUG, it will show you what the CSS is controlling

get it as its free then get onto youtube for some tutorials as it will save you HEAPSSSS of time once you know it.

tim
 

Community sponsors

Domain Parking Manager

AddMe Reputation Management

Digital Marketing Experts

Catch Expired Domains

Web Hosting

Members online

No members online now.

Forum statistics

Threads
11,098
Messages
92,044
Members
2,394
Latest member
Spacemo
Top