HTML comment tags
Goto page 1, 2  Next  :||:
Networking/Security Forums -> Programming and More

Author: Tom BairLocation: Portland, Oregon USA PostPosted: Tue Aug 20, 2002 3:08 am    Post subject: HTML comment tags
    ----
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?

Author: ShaolinTigerLocation: Kuala Lumpur, Malaysia PostPosted: Tue Aug 20, 2002 3:12 am    Post subject:
    ----
Nope that's VB I think.

It's:

<!-- Comment Here -->

Author: Tom BairLocation: Portland, Oregon USA PostPosted: Tue Aug 20, 2002 3:37 am    Post subject:
    ----
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!

Author: ShaolinTigerLocation: Kuala Lumpur, Malaysia PostPosted: Tue Aug 20, 2002 3:40 am    Post subject:
    ----
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

Author: Tom BairLocation: Portland, Oregon USA PostPosted: Tue Aug 20, 2002 3:52 am    Post subject:
    ----
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.

Author: WombatLocation: Canberra PostPosted: Tue Aug 20, 2002 4:34 am    Post subject:
    ----
/* comment */ also works in CSS Smile

Author: Tom BairLocation: Portland, Oregon USA PostPosted: Tue Aug 20, 2002 7:26 am    Post subject:
    ----
Forgive my thick-headedness tonight Wombat, but what does CSS stand for?

Author: hadsLocation: New Zealand PostPosted: Tue Aug 20, 2002 8:09 am    Post subject:
    ----
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

Author: WombatLocation: Canberra PostPosted: Tue Aug 20, 2002 8:14 am    Post subject:
    ----
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.

Author: Tom BairLocation: Portland, Oregon USA PostPosted: Tue Aug 20, 2002 9:40 am    Post subject:
    ----
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?

Author: TheKingsterLocation: UK PostPosted: Tue Aug 20, 2002 1:47 pm    Post subject:
    ----
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

Author: WombatLocation: Canberra PostPosted: Wed Aug 21, 2002 1:36 am    Post subject:
    ----
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 .

Author: Tom BairLocation: Portland, Oregon USA PostPosted: Wed Aug 21, 2002 1:41 am    Post subject:
    ----
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...

Author: Chozen1Location: NW, UK PostPosted: Wed Aug 21, 2002 1:49 pm    Post subject: CSS
    ----
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
%>

Author: Tom BairLocation: Portland, Oregon USA PostPosted: Wed Aug 21, 2002 9:23 pm    Post subject:
    ----
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?

Author: Chozen1Location: NW, UK PostPosted: Wed Aug 21, 2002 9:31 pm    Post subject: Hi
    ----
Thx PCWriter,

Not too bad, but not exactly what I need.

But nice try.

Smile

Chozen1



Networking/Security Forums -> Programming and More


output generated using printer-friendly topic mod, All times are GMT + 2 Hours

Goto page 1, 2  Next  :||:
Page 1 of 2

Powered by phpBB 2.0.x © 2001 phpBB Group