Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Basic usage  





2 Modifying the linking behavior  



2.1  Removing a state  





2.2  Unlinking a state  





2.3  Replacing a link  
















Template:TOC US states






Català
Scots
 

Edit links
 









Template
Talk
 

















Read
Edit
View history
 








Tools
   


Actions  



Read
Edit
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 
















Appearance
   

 






From Wikipedia, the free encyclopedia
 


  • Alaska
  • Arizona
  • Arkansas
  • California
  • Colorado
  • Connecticut
  • Delaware
  • Florida
  • Georgia
  • Hawaii
  • Idaho
  • Illinois
  • Indiana
  • Iowa
  • Kansas
  • Kentucky
  • Louisiana
  • Maine
  • Maryland
  • Massachusetts
  • Michigan
  • Minnesota
  • Mississippi
  • Missouri
  • Montana
  • Nebraska
  • Nevada
  • New Hampshire
  • New Jersey
  • New Mexico
  • New York
  • North Carolina
  • North Dakota
  • Ohio
  • Oklahoma
  • Oregon
  • Pennsylvania
  • Rhode Island
  • South Carolina
  • South Dakota
  • Tennessee
  • Texas
  • Utah
  • Vermont
  • Virginia
  • Washington
  • West Virginia
  • Wisconsin
  • Wyoming
  • There are various optional parameters:

    {{TOC US states|before=|DC=|PR=|UST=|after=|seealso=|refs=|extlinks=}}
    • before=links to be listed at the beginning
    • DC=y
    • PR=y
    • UST=y
    • after=links to be listed at the end
    • seealso=y
    • refs=y
    • extlinks=y

    Using DC, PR and/or UST causes "District of Columbia", "Puerto Rico" and/or "US Territories" to be inserted in the correct alphabetic position within the list of states; these three non-states are omitted by default. These can also be spelled out, e.g. |Puerto Rico=y. This feature is compatible with the other handling below (e.g. |DC=Washington, D.C. with change the displayed output).

    For before and after, a wikified list of one or more section headings is supplied as an argument, and those headings are inserted, either preceding the list of states (in the case of "before") or following it (in the cast of "after").

    Ifseealso=y, refs=y, and/or extlinks=y are present, links to a "See also", "References", and/or "External links" sections are included at the end.

    The before and after lists contain one or more sequences of wikified section names, combined with '*' unordered list formatting. For example:

    | after = [[#Footnotes|Footnotes]]
    * [[#Further reading|Further reading]]
    

    Review other uses of this template for additional examples of how it can be used.

    Modifying the linking behavior

    [edit]

    For all of the purposes below, the fully spelled-out codes |District of Columbia=, |Puerto Rico= and |US Territoris= must be used for those three cases, not the short versions DC, PR and UST.

    Removing a state

    [edit]

    To remove a particular state from the table of contents, use |State=, where State is either the name of the state, or the two letter abbreviation for the state. This is most useful in articles covering specific regions of the US, or time periods before certain states had formed. For example,

    | Kansas = | Alabama = 
    

    or

    | KS = | AL = 
    

    would remove Kansas and Alabama from the table of contents.

    Unlinking a state

    [edit]

    In an article where a section about a state is simply missing (e.g. due to lack of data), it is more useful to replace a state's link with unlinked text, than to omit it:

    | KS = Kansas | AL = Alabama
    

    or

    | Kansas = Kansas | Kansas = Alabama
    
    [edit]

    To change a state's link, use #-link wikimarkup:

    | ND = [[#North and South Dakota|North and South Dakota]] | SD = 
    

    or

    | North Dakota = [[#North and South Dakota|North and South Dakota]] | South Dakota = 
    

    This feature can also be used to link to sections in other articles, e.g. when a long list has been split into two pages.


    Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:TOC_US_states&oldid=1083935558"

    Category: 
    Wikipedia table of contents templates topical
     



    This page was last edited on 21 April 2022, at 17:13 (UTC).

    Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



    Privacy policy

    About Wikipedia

    Disclaimers

    Contact Wikipedia

    Code of Conduct

    Developers

    Statistics

    Cookie statement

    Mobile view



    Wikimedia Foundation
    Powered by MediaWiki