Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > HTML > BOOK: Beginning HTML and CSS (published March 2013)
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning HTML and CSS (published March 2013)
This is the forum to discuss the Wrox book Beginning HTML and CSS by Rob Larsen; ISBN: 978-1-1183-4018-9
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning HTML and CSS (published March 2013) section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old August 4th, 2016, 10:33 PM
Registered User
Points: 8, Level: 1
Points: 8, Level: 1 Points: 8, Level: 1 Points: 8, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2016
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
Default Question on Chap 3 Try it Out

Hi!
I have a quick question. In chapter 3, Try It Out, Creating Simple Links, #2 tells us to use
Code:
<nav>
element. But in #4 it is changed to
Code:
<div>
, what is the reason for that. I did it both ways and it appears the same. I know HTML is about markup, so which way is correct and why? Any answer will be helpful. Thanks
Reply With Quote
  #2 (permalink)  
Old August 5th, 2016, 12:46 PM
Registered User
Points: 18, Level: 1
Points: 18, Level: 1 Points: 18, Level: 1 Points: 18, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2016
Posts: 2
Thanks: 0
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by stretch1dr View Post
Hi!
I have a quick question. In chapter 3, Try It Out, Creating Simple Links, #2 tells us to use
Code:
<nav>
element. But in #4 it is changed to
Code:
<div>
, what is the reason for that. I did it both ways and it appears the same. I know HTML is about markup, so which way is correct and why? Any answer will be helpful. Thanks
I recently started reading the book, I'm barely in Chapter 5, so take what I say with a grain of salt.

But this is what I know:

The <div> marker doesn't represent anything, it's only used to group several elements for styling purposes.

And the <nav> marker is almost the same, however, this one is used especifically to represent a section of a page that links to other pages or to other parts within the page. In other words you will use this marker when you want to group several links. (Hence the reason we use nav as it stands for navigation)

Like you said before, you used both markers and both worked the same, because they don't affect at all in how your page works or looks, this is for whoever reads the source code, can easily identify especific parts of the page with ease.

I hope that helped.

(I apologize if that wasn't clear enough, English is not my native language)

Last edited by Tlalok90; August 5th, 2016 at 01:00 PM.
Reply With Quote
The Following User Says Thank You to Tlalok90 For This Useful Post:
stretch1dr (August 5th, 2016)
  #3 (permalink)  
Old August 5th, 2016, 09:11 PM
Registered User
Points: 8, Level: 1
Points: 8, Level: 1 Points: 8, Level: 1 Points: 8, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2016
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Yes, that helped a lot. I thought that was the case and I checked the source code for different web pages to see how it was use. Thanks for help and your explanation was very clear.
Reply With Quote
  #4 (permalink)  
Old August 5th, 2016, 09:20 PM
Registered User
Points: 18, Level: 1
Points: 18, Level: 1 Points: 18, Level: 1 Points: 18, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2016
Posts: 2
Thanks: 0
Thanked 1 Time in 1 Post
Default

You are welcome
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Chap 3 Custom View Sample Question newmvcworld_alo BOOK: Professional ASP.NET MVC 5 0 May 23rd, 2015 08:00 AM
Chap 16 Security Question missing jkoyle BOOK: Beginning ASP.NET 4 : in C# and VB 2 November 11th, 2011 07:19 PM
WebShop (Chap 9) Question about Login SDonnelly BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 3 October 19th, 2006 04:12 AM
WebShop (Chap 9) Question SDonnelly BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 18 May 23rd, 2006 11:33 AM



All times are GMT -4. The time now is 03:41 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.