|
-
Nov 28th, 2012, 01:37 PM
#1
[RESOLVED] [HTML] Question on <h> tags
I'm teaching myself HTML and what I'm doing is writting a vb.net tutorial in pure html since I'm allready familiar with vb.net. My question is, with <h> tags right now I'm doing this:
html Code:
<h1 id="variables"> <font color="black"> Visual Basic.Net - Variables </font> </h1> <h2 id="datatypes"> <center> <font color="blue"> Data Types </font> </center> </h2> <h3 id="syntax"> <center> <font color="blue"> Syntax </font> </center> </h3>
I do want the <h1> to be the biggest, because that's the main point of this particular article. But my question is, for the datatypes and syntax, could I use <h2> for both, just with a different ID, like this:
html Code:
<h2 id="datatypes"> <center> <font color="blue"> Data Types </font> </center> </h2> <h2 id="syntax"> <center> <font color="blue"> Syntax </font> </center> </h3>
or is that not good practice?
-
Nov 28th, 2012, 06:27 PM
#2
Re: [HTML] Question on <h> tags
well... are they at the same level, or is syntax a sub-header of datatypes? Think of H tags a being part of an outline... h1 is your 1. line... h2 would be your 1.1 line, and h3 would be 1.1.1 ... so if syntax is a subheader of datatypes, and you want this:
1 - Variables
1.1 - Datatypes
1.1.1 - Syntax
then use h1/h2/h3
But if you want
1 - Variables
1.1 - Datatypes
1.2 - Syntax
then use h1/h2/h2
(hint this is the option that in my opinion is the correct one semantically)
-tg
-
Nov 28th, 2012, 06:29 PM
#3
Re: [HTML] Question on <h> tags
Thanks TG, that cleared it up for me. The latter is what I was aiming for.
-
Nov 28th, 2012, 06:32 PM
#4
Re: [RESOLVED] [HTML] Question on <h> tags
jsut for edification.... to get
1 - Variables
1.1 - Datatypes
1.1.1 - Value Types
1.1.2 - Reference Types
1.2 - Syntax
it's h1
h2
h3
h3
h2
.
.
.
as I stated the H tags can be thought of the header lines of an outline.
-tg
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|