• RSS
  • Twitter
  • FaceBook

Security Forums

Log in

FAQ | Usergroups | Profile | Register | RSS | Posting Guidelines | Recent Posts

HTML comment tags

Users browsing this topic:0 Security Fans, 0 Stealth Security Fans
Registered Security Fans: None
Goto page 1, 2  Next
Post new topic   Reply to topic   Printer-friendly version    Networking/Security Forums Index -> Programming and More

View previous topic :: View next topic  
Author Message
Tom Bair
SF Boss
SF Boss


Joined: 10 Aug 2002
Posts: 16776955
Location: Portland, Oregon USA

Offline

PostPosted: Tue Aug 20, 2002 3:08 am    Post subject: HTML comment tags Reply with quote

I've been wanting to add comments to my index page, and in viewing source code of numerious sites I've found:

/* A comment can go between these two tags */

Is this correct?
Back to top
View user's profile Send private message Visit poster's website
ShaolinTiger
Forum Fanatic
Forum Fanatic


Joined: 18 Apr 2002
Posts: 16777215
Location: Kuala Lumpur, Malaysia

Offline

PostPosted: Tue Aug 20, 2002 3:12 am    Post subject: Reply with quote

Nope that's VB I think.

It's:

<!-- Comment Here -->
Back to top
View user's profile Send private message Visit poster's website
Tom Bair
SF Boss
SF Boss


Joined: 10 Aug 2002
Posts: 16776955
Location: Portland, Oregon USA

Offline

PostPosted: Tue Aug 20, 2002 3:37 am    Post subject: Reply with quote

ShaolinTiger wrote:
Nope that's VB I think.

It's:

<!-- Comment Here -->


I just scanned my "Mastering Visual Basic 6" manual and it shows (') as a comment tag. Wonder if (/*) and (*/) could be Java comment tags?

Anyway, I've seen your example before ... and will try it out. Thanks!
Back to top
View user's profile Send private message Visit poster's website
ShaolinTiger
Forum Fanatic
Forum Fanatic


Joined: 18 Apr 2002
Posts: 16777215
Location: Kuala Lumpur, Malaysia

Offline

PostPosted: Tue Aug 20, 2002 3:40 am    Post subject: Reply with quote

PCWriter wrote:
ShaolinTiger wrote:
Nope that's VB I think.

It's:

<!-- Comment Here -->


I just scanned my "Mastering Visual Basic 6" manual and it shows (') as a comment tag. Wonder if (/*) and (*/) could be Java comment tags?

Anyway, I've seen your example before ... and will try it out. Thanks!


Ah yeh you're right, Java, C, C++ etc use /* */.

Smile
Back to top
View user's profile Send private message Visit poster's website
Tom Bair
SF Boss
SF Boss


Joined: 10 Aug 2002
Posts: 16776955
Location: Portland, Oregon USA

Offline

PostPosted: Tue Aug 20, 2002 3:52 am    Post subject: Reply with quote

Thanks for the lead, Shaolin. I've found clear examples of <!---comment---> being used in the HTML source of two websites I just surfed. Wonder why none of my HTML programming books covers the use of comments? I feel a strong need to segment my index.html (home page) with comments so I can quickly locate a section when editing.
Back to top
View user's profile Send private message Visit poster's website
Wombat
Trusted SF Member
Trusted SF Member


Joined: 24 Apr 2002
Posts: 0
Location: Canberra

Offline

PostPosted: Tue Aug 20, 2002 4:34 am    Post subject: Reply with quote

/* comment */ also works in CSS Smile
Back to top
View user's profile Send private message
Tom Bair
SF Boss
SF Boss


Joined: 10 Aug 2002
Posts: 16776955
Location: Portland, Oregon USA

Offline

PostPosted: Tue Aug 20, 2002 7:26 am    Post subject: Reply with quote

Forgive my thick-headedness tonight Wombat, but what does CSS stand for?
Back to top
View user's profile Send private message Visit poster's website
hads
Trusted SF Member
Trusted SF Member


Joined: 23 May 2002
Posts: 3
Location: New Zealand

Offline

PostPosted: Tue Aug 20, 2002 8:09 am    Post subject: Reply with quote

Basically it superseeds HTML formatting tags <font> etc.

Quote:

What is CSS?

CSS stands for Cascading Style Sheets
Styles define how to display HTML elements
Styles are normally stored in Style Sheets
Styles were added to HTML 4.0 to solve a problem
External Style Sheets can save you a lot of work
External Style Sheets are stored in CSS files
Multiple style definitions will cascade into one


This is a good tutorial: http://www.w3schools.com/css/default.asp
Back to top
View user's profile Send private message
Wombat
Trusted SF Member
Trusted SF Member


Joined: 24 Apr 2002
Posts: 0
Location: Canberra

Offline

PostPosted: Tue Aug 20, 2002 8:14 am    Post subject: Reply with quote

CSS rocks. Say goodbye to nasty font tag nesting, update the look of your entire site by editing just one file, massively reduce your code/content ratio.

hads is right, that's a good tut.
Back to top
View user's profile Send private message
Tom Bair
SF Boss
SF Boss


Joined: 10 Aug 2002
Posts: 16776955
Location: Portland, Oregon USA

Offline

PostPosted: Tue Aug 20, 2002 9:40 am    Post subject: Reply with quote

Thanks hads ... I'm on that site now. I linked to it to go through their HTML tutorial on tables, then popped in here and saw your message Laughing

So Wombat,you think CSS is really great for creating webpage code? Do you think I should wait on it til I've come to understand how to code HTML by hand first? Or should I just rush into CSS and save myself time?
Back to top
View user's profile Send private message Visit poster's website
TheKingster
Link Spammer
Link Spammer


Joined: 03 May 2002
Posts: 0
Location: UK

Offline

PostPosted: Tue Aug 20, 2002 1:47 pm    Post subject: Reply with quote

shaolin i cant believe you dont remember /* */ from uni :p

I didnt cos I was a drop out but I expected more from you lmao Rolling Eyes
Back to top
View user's profile Send private message
Wombat
Trusted SF Member
Trusted SF Member


Joined: 24 Apr 2002
Posts: 0
Location: Canberra

Offline

PostPosted: Wed Aug 21, 2002 1:36 am    Post subject: Reply with quote

PCWriter, the two should go hand-in-hand, so learn both together. Doing simple things in CSS is actually really easy, for example you'll work out how to format text in less than a minute, I promise! OTOH, more complex stuff like positioning could take you an hour Wink .
Back to top
View user's profile Send private message
Tom Bair
SF Boss
SF Boss


Joined: 10 Aug 2002
Posts: 16776955
Location: Portland, Oregon USA

Offline

PostPosted: Wed Aug 21, 2002 1:41 am    Post subject: Reply with quote

Agreed, HTML and CSS are two methods of webpage development. You place your formatting standards in the CSS and call them from your HTML document.

I'm slowly learning...
Back to top
View user's profile Send private message Visit poster's website
Chozen1
Just Arrived
Just Arrived


Joined: 21 Apr 2002
Posts: 0
Location: NW, UK

Offline

PostPosted: Wed Aug 21, 2002 1:49 pm    Post subject: CSS Reply with quote

I love Cascading Style Sheets!

Gives u a warm feeling inside.

Smile

I do have a query to solve though.

I have a news headline page, and a news story page, choosing the headline gets the correct story from my Access DB and gets displayed. BUT. I cannot get the text size and font and style to the one I want.

The page is below, I would like it ARIAL, SIZE 1, BOLD, BLACK.

HELP.

<%
Dim ID
ID = Request.QueryString("ID") 'ID matches the Entry_ID for the news item in the database
'The following lines of code connect to the database and create the recordset.
Dim conCurrent
Dim rstCurrent
Set conCurrent = Server.CreateObject("ADODB.Connection")
Set rstCurrent = Server.CreateObject("ADODB.recordset")
conCurrent.connectionString = "driver={Microsoft Access Driver (*.mdb)};" & _
"dbq=c:\inetpub\wwwroot\news.mdb"
conCurrent.Open
strSQL="SELECT * FROM news WHERE Entry_ID=" & ID 'We use the ID here to select the correct
Set rstCurrent = conCurrent.Execute(strSQL) 'news item
%>

<html>
<head>
<title>News Detail Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Authors" content="Brent Wenson">
<link rel="stylesheet" href="style.css" type="text/css">
</head>

<body bgcolor="4a1486" text="#000000" link="#000099">
<CENTER>
<H1 align="left"><img src="siteimages/BMtext.jpg" width="179" height="32"></H1>
</CENTER>
<table border="1" bgcolor="#0080C0" bordercolor="#0099CC" width="667">
<tr>
<td>
<table border="1" align="center" width="760" bgcolor="#FFFFFF" bordercolor="#FFFFFF" height="482">
<tr>
<td align="left" valign="top" height="431" width="690" class="justified">
<p align="left"><img src="siteimages/News.jpg" width="111" height="48"></p>
<p align="left" class="justified">&nbsp;</p>
<p align="left" class="justified">
<%
' The next lines get the info from the current news record and write them to the HTML Page
%>
</p>
<p><i><%=rstCurrent("Entry_Date")%></i>&nbsp;-&nbsp;<b><%=rstCurrent("Title")%></b></p>
<p align="left" font face="Arial, Helvetica, sans-serif" size="1" class="justified"><%=rstCurrent("Text")%></p>
<p align="right">&nbsp;</p>
<p align="left"><font face="Arial, Helvetica, sans-serif" size="2"><b>
</b></font> <font face="Arial, Helvetica, sans-serif" size="2"><b>
</b></font></p>
<div align="right">
<p align="left"><b><font face="Arial, Helvetica, sans-serif" size="1"><a href="news.asp">&lt;--
Return to the Headlines</a></font></b></p>
</div>
</td>
<td align="left" valign="top" height="431" width="54">
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src=<%=rstCurrent("Images")%> alt=<%=rstCurrent("Comments")%>></p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>

<%
conCurrent.close
set conCurrent = Nothing
%>
Back to top
View user's profile Send private message Send e-mail
Tom Bair
SF Boss
SF Boss


Joined: 10 Aug 2002
Posts: 16776955
Location: Portland, Oregon USA

Offline

PostPosted: Wed Aug 21, 2002 9:23 pm    Post subject: Reply with quote

Nice problem, Chozen1. My solution is no doubt wrong since I am not up to speed with CSS and HTML -- yet if I wanted Arial, Size1, bold, black --- I'd change this line:

<p align="left" font face="Arial, Helvetica, sans-serif" size="1" class="justified"><%=rstCurrent("Text")%></p>

to read:

<p align="left" style="font-family:Arial;font-size:80%;color:black" size="1" class="justified"><%=rstCurrent("Text")%></p>

How close am I?
Back to top
View user's profile Send private message Visit poster's website
Chozen1
Just Arrived
Just Arrived


Joined: 21 Apr 2002
Posts: 0
Location: NW, UK

Offline

PostPosted: Wed Aug 21, 2002 9:31 pm    Post subject: Hi Reply with quote

Thx PCWriter,

Not too bad, but not exactly what I need.

But nice try.

Smile

Chozen1
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   

Post new topic   Reply to topic   Printer-friendly version    Networking/Security Forums Index -> Programming and More All times are GMT + 2 Hours
Goto page 1, 2  Next
Page 1 of 2


 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Looking for more Windows Networking info?

Sign up to the WindowsNetworking.com Monthly Newsletter, written by Enterprise Security MVP Deb Shinder, containing news, the hottest tips, Networking links of the month and much more. Subscribe today and don't miss a thing!
View a sample newsletter.

Become a WindowsNetworking.com member!

Discuss your Windows Networking issues with thousands of other Windows Newtorking experts. Click here to join!

Community Area

Log in | Register

Readers' Choice

Which is your preferred data recovery solution?

Follow TechGenix on Twitter