6 Replies - 628 Views - Last Post: 09 February 2013 - 04:20 PM

#1 W1174503  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 38
  • Joined: 07-January 13

Wonít show the text

Posted 05 February 2013 - 05:49 PM

I am having trouble with my html file. The page wonít show paragraph, bullet, or list (<p><ul><ol>). Any suggestions?

<!DOCTYPE html>

<html>
<head>
<title>Title</title>

	<style type"text/css">
	h1 {color:#7FFF00;
	font-family:arial;
	text-align:center;}
	p {line-height:130;
	text-indent:25px;}
	ul {font-weight:bold;}
	ol {font-style:italic;}
	body {background-color:yellow;}
	<!--color:white; (this would make all text white-->
	
	</style>
<!--h1 is what we are dealing with, we are changing color to blue, and chaning font to arial, makes text centered  -->
<!--p makes space between text 130%-->
<!--ul is bold-->
<!--ol is italic-->


</head>

<body>
<h1>My First Website</h1>
<p> this is paragraph text this is paragraph texthis is paragraph texthis is paragraph texthis is paragraph texthis is paragraph texthis is paragraph texthis is paragraph texthis is paragraph texthis is paragraph texthis is paragraph texthis is paragraph tex</p>
	<ul>
		<li>unordered list</li>
	</ul>
	<ol>
		<li> ordered list</li>
	</ol>
</body>
</html>





Thank you,
W1174503

Is This A Good Question/Topic? 0
  • +

Replies To: Wonít show the text

#2 no2pencil  Icon User is offline

  • Admiral Fancy Pants
  • member icon

Reputation: 5388
  • View blog
  • Posts: 27,384
  • Joined: 10-May 07

Re: Wonít show the text

Posted 05 February 2013 - 05:57 PM

You need the equals sign in your script tags :

<style type="text/css">


Was This Post Helpful? 1
  • +
  • -

#3 FerretHolmes  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 41
  • View blog
  • Posts: 167
  • Joined: 12-November 12

Re: Wonít show the text

Posted 06 February 2013 - 02:21 PM

You are not closing out your css element tags
h1 {
 color: #fff;
} <- Every element needs to be closed out



And some of the tags you don't have an opening brace either. Try formatting your code like I did above until you are comfortable with it.

Disregard my post. You have correct syntax. I overlooked it since it was not indented. :hehe:
Was This Post Helpful? 0
  • +
  • -

#4 raghav.naganathan  Icon User is offline

  • Perfectly Squared ;)
  • member icon

Reputation: 408
  • View blog
  • Posts: 1,440
  • Joined: 14-September 12

Re: Wonít show the text

Posted 06 February 2013 - 08:42 PM

Well, I thought so too but on close observation you see that the tags are closed in a later line.

Well, to avoid such confusion, I would suggest something like this...

h1 {
      color:#7FFF00;
      font-family:arial;
      text-align:center;
    }


So, in this way, there won't be any confusion, also it will enhance the readability of the program.

regards,
Raghav
Was This Post Helpful? 0
  • +
  • -

#5 raghav.naganathan  Icon User is offline

  • Perfectly Squared ;)
  • member icon

Reputation: 408
  • View blog
  • Posts: 1,440
  • Joined: 14-September 12

Re: Wonít show the text

Posted 07 February 2013 - 09:16 PM

View Postno2pencil, on 06 February 2013 - 06:27 AM, said:

You need the equals sign in your script tags


Well, shouldn't it be "You need the equals sign in your script style tags "

Script tag has format like this.
<script type="text/javascript">


regards,
Raghav

This post has been edited by raghav.naganathan: 07 February 2013 - 09:17 PM

Was This Post Helpful? 0
  • +
  • -

#6 FrankC  Icon User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 46
  • Joined: 06-October 11

Re: Wonít show the text

Posted 09 February 2013 - 12:21 PM

Quote

I am having trouble with my html file. The page wonít show paragraph, bullet, or list (<p><ul><ol>). Any suggestions?


For starters, CSS lines are outcommented by means of /* */, not <!-- -->. So chances are that your text is shown, only in white...
Was This Post Helpful? 0
  • +
  • -

#7 FerretHolmes  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 41
  • View blog
  • Posts: 167
  • Joined: 12-November 12

Re: Wonít show the text

Posted 09 February 2013 - 04:20 PM

View PostFrankC, on 09 February 2013 - 12:21 PM, said:

Quote

I am having trouble with my html file. The page wonít show paragraph, bullet, or list (<p><ul><ol>). Any suggestions?


For starters, CSS lines are outcommented by means of /* */, not <!-- -->. So chances are that your text is shown, only in white...


Even if the comment code was ignored, color:white; is not in an element block so it wouldn't do anything. Technically you can comment using the HTML method, but nothing below it will be processed.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1